httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Yamins <dyam...@gmail.com>
Subject [users@httpd] interaction between apache and OSX 10.5.7 finder
Date Thu, 01 Oct 2009 14:16:25 GMT
Sorry for posting again, but I posted this a few days ago and got no
responses.  but I think this is probably the right list ...

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

Mime
View raw message