Neither work
--
http://mail.python.org/mailman/listinfo/python-list
I am using execfile, setting stdin and stdout like this:
sys.stdin = self.wfile
sys.stdout = self.rfile
execfile(filename)
Its the same code used in the CGIHTTPServer module. I know that the
python is executing corretly, a script with this content would work:
print ""
print ""
print ""
print "bl
I just read somewhere that the CGIHTTPServer module does not work on
mac (which I am currently using), is this true?
--
http://mail.python.org/mailman/listinfo/python-list
I have included some of the content of that file, I am writing this as
an extension to my ebserver which is based on BaseHTTPServer. This
part of the code was taken directly from the CGIHTTPServer file,
nothing changed
--
http://mail.python.org/mailman/listinfo/python-list
I am writing a webserver, and I want it to be able to run python
scripts. But when I set sys.stdin to self.rfile (using the
BaseHTTPServer class, self.rfile is a input stream containing the
request), the cgi module does not parse the data.
Example script:
import cgi
form = cgi.FieldStorage()
print
Thanks, but when I try to read the stream using read(), the script just
keeps on going and does not stop. When i press ctrl + c, the script
shows thsi (top of error taken off):
File "modules/runpython.py", line 88, in runModule
sys.stdin = self.rfile.read()
File
"/System/Library/Frameworks/
A little while ago, someone told me that for the BaseHTTPServer module,
the whole request would be stored in self.rfile.
I looked at the doumentation and is says rfile is:
"Contains an input stream, positioned at the start of the optional
input data."
How do i get the input out of it?
--
http://
I looked at the doumentation and is says rfile is:
"Contains an input stream, positioned at the start of the optional
input data."
How do i get the input out of it?
--
http://mail.python.org/mailman/listinfo/python-list
Never mind, figured out
--
http://mail.python.org/mailman/listinfo/python-list
This code always returns a ValueError when it is not supposed to:
i = rest.rfind('?')
Error:
ValueError: need more than 0 values to unpack
rfind is not supposed to generate an erro, just return -1. Any ideas?
--
http://mail.python.org/mailman/listinfo/python-list
On windows, is there anything special I have to do to read a binary
file correctly?
--
http://mail.python.org/mailman/listinfo/python-list
Thanks, all I wanted to know where the post data was stored from the
request
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for your help. Another question, is there an built in md5/sha1
function in python?
--
http://mail.python.org/mailman/listinfo/python-list
What I am trying to do is call perl on the command line. Also, do any
of these functions return the data recievved from the command?
--
http://mail.python.org/mailman/listinfo/python-list
>From the BaseHTTPServer module, how do i gget the POST or GET data sent
by the client? Is it stired the the file they requested? e.g.
objectname.path
--
http://mail.python.org/mailman/listinfo/python-list
>From the BaseHTTPServer module, how do i gget the POST or GET data sent
by the client? Is it stired the the file they requested? e.g.
objectname.path
--
http://mail.python.org/mailman/listinfo/python-list
Hoe would I call something on the command line from python, e.g. "ls
-la"?
--
http://mail.python.org/mailman/listinfo/python-list
Hoe would I call something on the command line from python, e.g. "ls
-la"?
--
http://mail.python.org/mailman/listinfo/python-list
Thanks a lot. The webserver I am writing works now :)
--
http://mail.python.org/mailman/listinfo/python-list
I was wondering how i could parse the contents of a file into an array.
the file would look something like this:
gif:image/gif
html:text/html
jpg:image/jpeg
...
As you can see, it contains the mime type and the file extension
seperated by commas, 1 per line. I was wondering if it was possible t
20 matches
Mail list logo