MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 6 as of 2014-09-26 22:05:54
  • Python
  • Twisted

Twisted

Twisted is an event-driven networking engine written in Python and licensed under the open source MIT license.

Install from source

  • su
  • cd /tmp
  • wget http://twistedmatrix.com/Releases/Twisted/13.1/Twisted-13.1.0.tar.bz2

  • tar xvif Twisted-13.1.0.tar.bz2
  • cd Twisted-13.1.0
  • python2.7 setup.py build
  • python2.7 setup.py install

Test installation

  • python
  • from twisted.internet import protocol, reactor
  • quit()

Slackbuild

  • su
  • cd /tmp
  • wget http://slackbuilds.org/slackbuilds/14.1/python/python-twisted.tar.gz

  • tar xvzf python-twisted.tar.gz
  • cd python-twisted
  • wget https://pypi.python.org/packages/source/T/Twisted/Twisted-13.2.0.tar.bz2

  • ./python-twisted.SlackBuild

  • installpkg /tmp/python-twisted-13.2.0-x86_64-1_SBo.tgz

Slackware64 14: python-twisted-13.2.0-x86_64-1_SBo.tgz

Echo server

   1 from twisted.internet import protocol, reactor
   2 
   3 class Echo(protocol.Protocol):
   4     def dataReceived(self, data):
   5         self.transport.write(data)
   6 
   7 class EchoFactory(protocol.Factory):
   8     def buildProtocol(self, addr):
   9         return Echo()
  10 
  11 reactor.listenTCP(1234, EchoFactory())
  12 reactor.run()
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01