source: ralphm-patches/py3-examples.patch

Last change on this file was 78:361e2111a663, checked in by Ralph Meijer <ralphm@…>, 6 years ago

Start port to Python 3.

File size: 865 bytes
  • doc/examples/echo_server.tac

    # HG changeset patch
    # Parent  f46b53ebfea79c12dd9d7f0b81b2762c7008614c
    
    diff --git a/doc/examples/echo_server.tac b/doc/examples/echo_server.tac
    a b  
    88"""
    99
    1010from twisted.application import service, strports
     11from twisted.python.compat import unicode
    1112from twisted.words.protocols.jabber.xmlstream import toResponse
    1213from wokkel import component, server, xmppim
    1314
  • doc/examples/pinger.py

    diff --git a/doc/examples/pinger.py b/doc/examples/pinger.py
    a b  
    1515
    1616    def connectionInitialized(self):
    1717        def cb(response):
    18             print "*** Pong ***"
     18            print("*** Pong ***")
    1919
    20         print "*** Ping ***"
     20        print("*** Ping ***")
    2121        d = self.ping(self.entity, sender=self.sender)
    2222        d.addCallback(cb)
Note: See TracBrowser for help on using the repository browser.