Hello I'm writing a web server in python(obelisk-http.sourceforge.net)
and I'm having a greeat problem with POST method it like that
When someone make a POST request to the server it must open the executable(perl/python/.exe/elf) and send to the STANDART in (stdin) the request and get the response.
when i send the request to stdin of any binarie(.exe or elf) works
but when i try to use a script it don't read the stdin I'm using a code like that
What error are you getting? It will be difficult to help you unless you share information like that. I tried the first bit of code that you've supplied, and it works fine on a terminal.
you are also not using the methods you imported from subprocess..I assume you are going to used them later?
thesubprocess s module in later Python version is meant to replace os.popen* and other older methods.
last point : its better to structure your script.py so that you can import them into your script, instead of calling them from the shell..an example of what i mean
script.py