Re: wepy

2006-04-20 Thread Fırat KÜÇÜK
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

Re: wepy

2006-04-20 Thread Mike Looijmans
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

Re: wepy

2006-04-20 Thread Fırat KÜÇÜK
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

Re: wepy

2006-04-20 Thread Fırat KÜÇÜK
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

Re: wepy

2006-04-20 Thread Mike Looijmans
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