[Pythonmac-SIG] More PythonCGISlave notes.

Just van Rossum just@letterror.com
Wed, 2 Aug 2000 23:58:05 +0100


At 2:48 PM -0700 02-08-2000, Chris Barker wrote:
>Well, perhaps it's line 69:
>
>print "%s version %s ready." % (self.__class__.__name__, __version__)
>
>Without it it doesn't bring up the window. Will this cause any problems?
>As it happens, I've used sys.stdout to write data for diagnosing
>problems. Should I re-direct it?

Oops, sorry, I misinformed you. It is the reverse: for PythonCGISlave,
"delay console until needed" should be *off*. This way, the SIOUX window +
menus get installed before the applets own menus override them.

>I've also found why it's not working for me. It crashes on line 79:
>
>root = args['DIRE'].as_pathname()
>
>args does not get a 'DIRE' key. It looks like this is supposed to get
>passed in from the Web server by the AppleEvent, but apparently it's
>not. I know NOTHING about AppleEvents, so I am completely lost now. I'm
>using Personal Web Sharing in MAC OS 8.6. MacPython 1.5.2c Does anyone
>have it working with these versions?

Ah, this may be a WebStar-specific key. The thing to do is hardwire the
script path in PythonCGISlave.py, possibly as a relative path from the
applet (by looking at os.getcwd() at startup).

Just