pound bang (#!) problem...
Orlando Vazquez
ovazquez at sprint.ca
Sun Dec 26 20:43:03 EST 1999
Hi guys,
I'm working on an html preprocessor for a site and I came across a
problem. I want to have a special extension on files that will be
executed by the server. (say .pyhtml)
for simplicity's sake say this is my preprocessor (preprocessor.py):
#!/usr/local/bin/python
import sys
s = sys.stdin.read() # read until EOF and store in "s"
print s # print what we read
and my un processed file (index.pyhtml) looks like..
#!./preprocessor.py
python rules!
If my UNIX skills serve me correctly running:
./index.pyhtml
should be the same as running:
./preprocessor.py < index.pyhtml
Right? But, when I do run index.pyhtm alone it just sits there and does
not read the file. I'm probably making a silly mistake, but I can't see
it..
How can I make this idea work?
Thanks a great deal!
--
Orlando Vazquez
More information about the Python-list
mailing list