2012-01-13

Python / Twisted / WebSocket / Protobuf on Windows 7 (64bit)





Python Basic
============


- Install 32-bit Python 2.7.2


- Install setuptool-0.6c11.win32-py2.7.exe (easy_install)


Twisted Framework and SSL support
=================================


- Install Twisted-11.1.0 from source code ( it installs zope interface automatically from internet)


    unzip Twisted-11.1.0.tar.bz2
    cd Twisted-11.1.0
    setup.py install


- Install Win32OpenSSL 32bit 1.0.0e 


- Install pyOpenSSL (Twisted SSL support needs this)


    cd c:\python2.7\scripts
    easy_install pyopenssl


WebSocket Autobahn
==================


- Install Autobahn from source code


    unzip autobahn
    cd autobahn\lib\python 
    setup.py install


  Test the Autobahn installation


    cd autobahn\demo\echo
    echo_server.py


    In another DOS window


    cd autobahn\demo\echo
    echo_client.py


  Test the SSL support of WebSocket and Twisted


    cd autobahn\demo\echo_tls
    echo_tls_server.py


    In another DOS window
    
    cd autobahn\demo\echo_tls
    echo_tls_client.py -u wss://localhost:9000
  
Protobuf and Protobuf.socketrpc
===============================


- Install protobuf Python library from source code


    unzip protobuf-2.4.1-win32.zip
    cd protobuf-2.4.1\python
    setup.py install
    
- Install protobuf compiler Windows binary


    create d:\temp\protoc
    add d:\temp\protoc to PATH
    put protoc.exe into d:\temp\protoc


- Install protobuf.socketrpc from source code


    unzip protobuf.socketrpc-1.3.2.tar.gz
    cd protobuf.socketrpc-1.3.2
    setup.py install


  Test the protobuf.socketrpc


    cd protobuf.socketrpc-1.3.2\src\protobuf\socketrpc\examples\helloworld
    run_server.py


    In another DOS windows


    cd protobuf.socketrpc-1.3.2\src\protobuf\socketrpc\examples\helloworld
    run_client.py




  
  

No comments:

Post a Comment