> 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?
you are right, i mean that it is the core of the webserver
> If you're using some code that you've written (or found)
> to handle web
> requests
> 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?
i am playng around this code :
<code>
import socket
import sys
import web
import datetime
urls = (
'/(.*)', 'view'
)
class view:
def GET(self, name):
print datetime.datetime.today()
if __name__ == "__main__":
hostname = socket.gethostname()
ip = socket.gethostbyname(hostname)
sys.argv.append(ip +':8080') # <-- probably this is not
the right way, but it works
web.run(urls)
</code>
> (Or maybe web.py contains a simple webserver in the
> module when it's run
> as main?)
yes - in this case it responds to http request like a server
regards
e.
-----------------------------
Как да получите 10% отстъпка от цените
за оригинални консумативи и принтери на HP
http://digiteq.com/
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor