Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I run twisted from the console?

I'm using Python 3 with Anaconda on Windows 7. I installed Twisted with conda install twisted, and now I'm trying to run twisted (or twistd?) from the console, but I get this error

'twisted' is not recognized as an internal or external command, operable program or batch file.

which makes me think a directory is missing from the path, as in this question. Anaconda is installed in C:\Anaconda3, but even in C:\Anaconda3\Lib\site-packages\twisted, there isn't a twisted.py or twistd.py file.

Am I doing something wrong, or am I looking in the wrong place for the file(s)?

Is this an issue because Twisted isn't officially ported to Python 3 yet?

like image 962
Michael A Avatar asked Jun 17 '15 21:06

Michael A


1 Answers

twistd runs twisted applications (though you can run a script with Twisted code in it like any other Python file) and should be in the bin directory inside your Anaconda installation directory, so if you can get conda, you can get twistd as well.

twisted is the library you use to write code that uses Twisted, so you can't run that from the command line.

Here is the status of Twisted on Python3 https://twistedmatrix.com/trac/milestone/Python-3.x

And here is the particular ticket about twistd not being available on Python3 yet https://twistedmatrix.com/trac/ticket/7497

like image 102
belteshazzar Avatar answered Oct 26 '22 22:10

belteshazzar