import sys
sys.stdout.write(open('penguin.png', 'rb').read())
NO. NO. NO.
sys.stdout is a global variable. If you want sys.stdout.write() to end
up in the user's terminal, your web server will be able to either serve
only one request at a time, or must be forced into running separate
proces
import sys
sys.stdout.write(open('penguin.png', 'rb').read())
NO. NO. NO.
sys.stdout is a global variable. If you want sys.stdout.write() to end
up in the user's terminal, your web server will be able to either
serve only one request at a time, or must be forced into running
separate pr
Mike Looijmans yazmış:
Fırat KÜÇÜK wrote:
Hi,
we have been started a project called wepy! it is a modpython based
PHP and
Python mix. Here are the some samples about wepy:
It would help a lot if you'd share with us exactly what you are trying
to accomplish here. Your examples look a lot
Your code is perfectly thread safe, yes. But the assignment to
sys.stdout IS NOT. There is only one sys.stdout, and all threads use the
same one.
Example (two threads):
##Thread 1:
- initializes request from client 1
- sets sys.stdout to StdOut(request ...) object
- writes "hello1 " to sys.std
Mike Looijmans yazmış:
Your code is perfectly thread safe, yes. But the assignment to
sys.stdout IS NOT. There is only one sys.stdout, and all threads use
the same one.
Example (two threads):
##Thread 1:
- initializes request from client 1
- sets sys.stdout to StdOut(request ...) object
- wr
PythonHandlerModule doesn't set up PythonAuthenHandler registration.
Key: MODPYTHON-166
URL: http://issues.apache.org/jira/browse/MODPYTHON-166
Project: mod_python
Type: Bug
Components: core
[ http://issues.apache.org/jira/browse/MODPYTHON-166?page=all ]
Work on MODPYTHON-166 started by Graham Dumpleton
> PythonHandlerModule doesn't set up PythonAuthenHandler registration.
>
>
> Key: MODPYTHON-166
[
http://issues.apache.org/jira/browse/MODPYTHON-166?page=comments#action_12375469
]
Graham Dumpleton commented on MODPYTHON-166:
Also missing registration of PythonFixupHandler.
> PythonHandlerModule doesn't set up PythonAuthenHandler registra
[ http://issues.apache.org/jira/browse/MODPYTHON-166?page=all ]
Graham Dumpleton resolved MODPYTHON-166:
Fix Version: 3.3
Resolution: Fixed
> PythonHandlerModule doesn't set up PythonAuthenHandler registration.
> ---