[AG-DEV] Trying to understand the debug option

Eric Olson eolson at mcs.anl.gov
Fri May 9 12:09:57 CDT 2008


Hi Mike,
The --debug option only affects how much output is printed.

It's already available if you're doing this:
app = Toolkit.CmdlineApplication.instance()
app.Initialize("BasicApp")

The first thing you want is to open the output in a shell window -- 
probably on MS Windows.

That happens for a python program on windows when it's started with 
python.exe instead of pythonw.exe.

For shared applications, there are two ways you could change this:

A)
The command used to open your shared app is stored in the 
ApplicationDatabase:  (likely here: C:\Documents and 
Settings\USERNAME\Application Data\AccessGrid3\Config\ApplicationDatabase)

You can open it and change the line that opens your shared app from 
"pythonw.exe" to "python.exe".  You can also add the "-d" in there if 
you want.

B)
Instead of manually editing the file, you could alternatively reregister 
your shared app using "python.exe agpm.py ..." to have the same effect. 
Whichever you run agpm with, pythonw.exe or python.exe, will be the cmd 
stored in the ApplicationDatabase.  If you're double-clicking on an 
agpkg file to install it, pythonw.exe is the one being used.


Eric


Michael Miller wrote:
> I'd like to add a -d --debug option to my sharedapp.  But in looking at VenueClient3.py and VenueServer3.py, I see where the "port" or "personalNode" options are handled, but the "debug" option isn't handled there.  Where can I find an example of how the "debug" option is incorporated into a script to open up a shell dialog and show the script output?
> 
> thanks
> 
> myk
> 
> 
> 




More information about the ag-dev mailing list