while learning some basic programming with python, i found web.py. i got stuck with a stupid problem:
i wrote a simple console app with a main loop that proccesses items
I found a working solution. In a seperate module i create my webserver:
import web
import threading
class MyWebserver(threading.Thread):
def run (self):
urls = ('/', 'MyWebserver')
app = web.application(urls, globals())
app.run()
def POST ...
In the main programm i just call
MyWebserver().start()
and than go on with whatever i want while having the webserver working in the background.