El 20/12/17 a les 11:26, Cato Nano ha escrit:
Il giorno mercoledì 20 dicembre 2017 10:24:46 UTC+1, Sergi Almacellas Abellana 
ha scritto:
El 19/12/17 a les 18:12, Cato Nano ha escrit:
Until now, I have been editing the sources of my module "off line" then I have 
rebuilt my modue on every edit, in order to see the results

What do you mean by "off line". In your own computer and then uploading
to production server?

With "off line" I mean I edit my code without being connected to the running 
server process
That's what we all do.

I d like to have a prompt from an interpreter hooked into the running server 
and being  able to inspect variables and maybe instantiating classes within the 
running server

You can use standard python standard debugger for this [1]. For example if you include the following lines in your source code:

import pdb
pdb.set_trace()

Once the server reaches this line you will get a interactive prompt to explore the defined variables and execute some code with them.

A simpler way is to inclue print statements on the code that will be printed to the server console.

Sort of exploring the codebase interactively

In order to learn it faster


I saw there s the Proteus project that seems to be aimed at providing a prompt 
to interactively work with my modules
Indeed proteus is to work with your data: Create/Modify/Delete records
from your database. It supports all modules installed on the database.

Hope it helps.

I guess it does help, thanks

How would I use Proteus ?

For example, proteus is used to populate the demo database. The demo script[2] is public available .

[1] https://docs.python.org/2/library/pdb.html
[2] http://hg.tryton.org/tryton-tools/file/9c29e2dc9c21/tryton_demo.py



--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/e0489d92-81c2-24ec-af36-2833f77d2fa9%40koolpi.com.

Reply via email to