I am new to python and twisted, and I tried to run a simple twisted script, but could not.
My environment:
MacOX 10.7.2 + Python 2.7.1 + Twisted 11.0.0 + eclipse + PyDev
the script is called test.py:
from twisted import reactor reactor.run()
I tried to run it in the terminal and everything is working fine.
Then I opened eclipse and created a new PyDev project, and then added a py file called test.py and enter the code above.
When I tried to start it, I got errors like:
Traceback (most recent call last): File "/Users/user/Documents/workspace/TwistedDemo/test.py", line 2, in <module> from twisted import reactor ImportError: No module named twisted
Then I checked PYTHONPATH and added the "inverted source folder" in the external libraries tab, but there were still errors. (nothing changed)
Hope someone can help me, thanks in advance :)
python pydev
supersuraccoon
source share