You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dan Yamins <dy...@gmail.com> on 2009/10/01 16:16:25 UTC
[users@httpd] interaction between apache and OSX 10.5.7 finder
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