I have an apache virtual host for some local development I'm doing using
python cgi scripts.

Here is a example script that should open a "Finder" window on the server if
the server is running OSX, and an explorer window if it's running windows or
cygwin.

-------
print 'Content-Type: text/html\n\n'
import os
import platform

if (platform.platform().startswith('Darwin') or platform.mac_ver()[0] !=
''):
     os.system('open .')
elif platform.platform().startswith('Windows') or
platform.platform().startswith('CYGWIN'):
     os.system('explorer .')
-------


This script works when run manually, e.g. not through Apache.  It also works
on Windows and CYGWIN.   Also it used to work on OSX before I updated to
from OS 10.5.6 to 10.5.7.
Now, however it doesn't work on OSX.  Nothing happens when I load the page.


Similarly this script should open a text editor window if the server is OSX:

-------
print 'Content-Type: text/html\n\n'
import os
import platform

if (platform.platform().startswith('Darwin') or platform.mac_ver()[0] !=
''):
     os.system('edit myfile.txt')
-------

It also used to work, but it also no longer does.

If anyone can give me a clue as to what might be happening that would be
great.

Thanks!
Dan

Reply via email to