Hi guys!
I want to run external function from module example in my index.py
file.
And i do it like this:
import web
import example
import os
urls = (
'/','index'
)
render = web.template.render('templates/')
app = web.application(urls,globals())
class index:
def GET(self):
a = example.main()
if a:
result = "<p>True!!</p>"
else:
result = "<p>False!!</p>"
return render.index(result)
if __name__ == "__main__":
app.run()
But it is allways an error occurs there:
ValueError: signal only works in main thread.
example.main runs an instance of scrapy (http://scrapy.org/) spider
which uses threading...
Any idieas?
thanks a lot!
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.