Thursday, February 7, 2013

Test Twisted Python on windows

Twisted is one popular event-driven network engine writen in python. basically, it can create a web server as the node.js do, and also provide the similar features as socket io like the pub/sub through internet. to test it, we need install python, and load the necessary dependencies. and PIP is one tool to do the package installation for you. here are some basic steps to test twisted.

Install python 2.7, just download the installer the run it, then put the path of the installed directory to system path environment. I just installed it under c:\python27. then we can run python to launch the interactive shell.
image

then install the pip utility.
PIP require setuptools utility, http://pypi.python.org/pypi/setuptools
you can pickup the exe download, or just download the 64 bit setup script. then download the pip package. and extract it to a local folder.
image
when done, it will create some utility under the python27 scripts folder, like pip.exe. then we can add this folder the system path env as well.
image

Install twisted, for the twisted , it require zope.interface. now we have pip, just run pip install zope.interface to install the dependency.

image

Now download the twisted windows installer http://twistedmatrix.com/trac/, click and good to go.
after all done, we can open the python shell, and list the twisted package.

then create one simple web server,and run it,
image

image

No comments:

 
Locations of visitors to this page