[AG-DEV] Trying to understand the debug option

Michael Miller mimiller at ncsa.uiuc.edu
Fri May 9 14:24:07 CDT 2008


Eric,

Here's what I have in the appdatabase:

[application/x-ag-shared-browser]
8d8ede761bf01e4b7d0fdd82ea2ce39e = C:\Python24\python.exe SharedBrowser.py -d -a %(appUrl)s

and the sharedbrowser window doesn't show.  No log file is created so I have no idea what's wrong.

Here's the output from the venueclient console:

05/09/08 14:21:13 16252 VenueClient     venueclientui.py:4649 INFO  Got commands:
(application/x-ag-shared-browser) {'Open': 'C:\\Python24\\python.exe SharedBrowser
.py -d -a %(appUrl)s'}
05/09/08 14:21:16 16252 VenueClientController     venueclientcontroller.py:1542 IN
FO  StartCmd starting command: C:\Python24\python.exe SharedBrowser.py -d -a https
://141.142.224.40:8000/Venues/000000fe456540d8008d008e0040000bfa6/apps/8d8ee0287ab
c2e34b5faa4dca062dfdd
05/09/08 14:21:16 16252 ProcessManager     processmanager.py:62 DEBUG Creating pro
cess: C:\Python24\python.exe SharedBrowser.py -d -a https://141.142.224.40:8000/Ve
nues/000000fe456540d8008d008e0040000bfa6/apps/8d8ee0287abc2e34b5faa4dca062dfdd
05/09/08 14:21:16 16252 ProcessManager     processmanager.py:75 DEBUG Create proce
ss returns: (<PyHANDLE:1840>, <PyHANDLE:2028>, 17332, 12536)


Does this look correct?

thanks

myk
----- Original Message -----
From: "Eric Olson" <eolson at mcs.anl.gov>
To: "Michael Miller" <mimiller at ncsa.uiuc.edu>
Cc: "AG-DEV" <ag-dev at mcs.anl.gov>
Sent: Friday, May 9, 2008 12:09:57 PM GMT -06:00 US/Canada Central
Subject: Re: [AG-DEV] Trying to understand the debug option

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