[Tutor] threads and webpy

Luke Paireepinart rabidpoobear at gmail.com
Wed Aug 16 18:28:02 CEST 2006

> yes - i will ask the webpy authors
> but i expected to fond out a way to start two (or more)
> scripts (web.py) in different threads from one puthon's
> scrypt. OR two pythons interpretators to execute the above
> scrypt ?
Python is a programming language. It's not a question about whether it's 
rather, it's who will do it.  If all you really want to do is start 2 
web.py scripts
from one python script you'd do something like this:
# ---- (non-working code)
import subprocess
subprocess.Popen('python web.py')
subprocess.Popen('python web.py')
This may or may not work.  You may only be able to subprocess actual 
executable files.
This is probably not what you want to do, though.
You'll probably have to learn how to program in Python to do this.
 ... ... ... ... ... ...

I just looked at web.py.
It's not a webserver.  It's a toolkit you use to write your own webserver.
Why are you under the impression that it's a webserver?
Did you just google for 'web server in Python' and find this?
If you're using some code that you've written (or found) to handle web 
using the 'web.py' module, then show us your code and we'll tell you
how to make it into a class that listens on a single IP and how to
start two listen() methods of the class using threads, or maybe even
handling multiple IPs using a single class instance.
But just knowing that you are using 'web.py' isn't very helpful.
What actual code are you using to run the webserver?
(Or maybe web.py contains a simple webserver in the module when it's run 
as main?)

> cheers
> e.
> -----------------------------
> Колите. Само в кината от 4 август.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list