~certify-web-dev/twisted/certify-staging

« back to all changes in this revision

Viewing changes to doc/examples/pbecho.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-01-02 19:38:17 UTC
  • mfrom: (2.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100102193817-jphp464ppwh7dulg
Tags: 9.0.0-1
* python-twisted: Depend on the python-twisted-* 9.0 packages.
* python-twisted: Depend on python-zope.interface only. Closes: #557781.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
1
# Copyright (c) 2001-2006 Twisted Matrix Laboratories.
3
2
# See LICENSE for details.
4
3
 
 
4
if __name__ == '__main__':
 
5
    # Avoid using any names defined in the "__main__" module.
 
6
    from pbecho import main
 
7
    raise SystemExit(main())
 
8
 
5
9
from zope.interface import implements
6
10
 
7
11
from twisted.spread import pb
35
39
            raise NotImplementedError("no interface")
36
40
 
37
41
 
38
 
if __name__ == '__main__':
 
42
def main():
39
43
    from twisted.internet import reactor
40
44
    from twisted.cred.portal import Portal
41
45
    from twisted.cred.checkers import InMemoryUsernamePasswordDatabaseDontUse