~ubuntu-branches/debian/sid/pyro/sid

« back to all changes in this revision

Viewing changes to examples/AllInOne/allinone_threads.py

  • Committer: Bazaar Package Importer
  • Author(s): Bernd Zeimetz, Bernd Zeimetz, Sandro Tosi
  • Date: 2008-03-23 12:58:43 UTC
  • mfrom: (4.1.1 hardy)
  • Revision ID: james.westby@ubuntu.com-20080323125843-8zrvz1whkwzdyjxk
Tags: 3.7-2
[ Bernd Zeimetz ]
* debian/control:
  - Adding Homepage field, removing pseudo-field from description
  - Rename XS-Vcs-* fields to Vcs-* (dpkg supports them now)
  - Updating my email address.

[ Sandro Tosi ]
* debian/control
  - uniforming Vcs-Browser field
  - bump Standards-Version to 3.7.3
  - bump versioned build-dep on python-central to at least 0.6
* debian/copyright
  - converted to UTF-8
  - renamed copyright section to license
  - indented upstream author and license with 4 spaces
  - added copyright notice
* debian/pyro-doc.doc-base
  - updated section
  - removed empty tailing lines
* debian/pyro-gui.install
  - removed python-central directory (moved to debian/rules)
* debian/pyro.install
  - removed python-central directory (moved to debian/rules)
* debian/rules
  - updated due to new python-central directories structure (Closes:
    #472039)
  - integrate files under python-central directory into dh_install call
  - moved dh_install calls to install target

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import Pyro.EventService.Server
24
24
from Pyro.EventService.Clients import Publisher, Subscriber
25
25
from Pyro.errors import *
 
26
import Pyro.util
26
27
 
27
28
from threading import Thread
28
29
 
128
129
        p1 = Pyro.core.getProxyForURI("PYRONAME://publisher1")
129
130
        p2 = Pyro.core.getProxyForURI("PYRONAME://publisher2")
130
131
        p3 = Pyro.core.getProxyForURI("PYRONAME://publisher3")
131
 
        while 1:
132
 
                print "MAIN LOOP CHANGES PROPERTIES..."
133
 
                p1.setProperty(random.choice(string.uppercase), random.randint(0,1000))
134
 
                p2.setProperty(random.choice(string.uppercase), random.randint(0,1000))
135
 
                p3.setProperty(random.choice(string.uppercase), random.randint(0,1000))
136
 
                time.sleep(1)
 
132
        try:
 
133
                while 1:
 
134
                        print "MAIN LOOP CHANGES PROPERTIES..."
 
135
                        p1.setProperty(random.choice(string.uppercase), random.randint(0,1000))
 
136
                        p2.setProperty(random.choice(string.uppercase), random.randint(0,1000))
 
137
                        p3.setProperty(random.choice(string.uppercase), random.randint(0,1000))
 
138
                        time.sleep(1)
 
139
        except Exception,x:
 
140
                print "".join(Pyro.util.getPyroTraceback(x))
137
141
 
138
142
if __name__=="__main__":
139
143
        main()