本文整理汇总了Python中pubsub.py2and3.print_函数的典型用法代码示例。如果您正苦于以下问题:Python print_函数的具体用法?Python print_怎么用?Python print_使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: threadObserver
def threadObserver(transfers, threadObj, count):
"""Listener that listens for data from testTopic. This function
doesn't know where the data comes from (or in what thread it was
generated... but threadObj is the thread in which this
threadObserver is called and should indicate Main thread)."""
print_(transfers, threadObj, count / resultStep)
开发者ID:HelioGuilherme66,项目名称:Phoenix,代码行数:7,代码来源:multithreadloop.py
示例2: run
def run(self):
print_('aux thread started')
self.running = True
while self.running:
self.count += 1
if self.count % resultStep == 0:
self.queue.put(self.count)
print_('aux thread done')
开发者ID:HelioGuilherme66,项目名称:Phoenix,代码行数:9,代码来源:multithreadloop.py
示例3: main
def main():
# do stuff
# creating manual state changes
#a = exithouse.ExitHouse(initdict)
#initdict["dooropen_flag"] = True
#ruleoutcome = a.evaluateRule(**initdict)
#print "Main: outcome of ExitHouse:EvaluateRule: " + str(ruleoutcome)
# creating windows that help create automatic state changes
app = wx.App()
c = Controller()
sys.stdout = sys.__stdout__
print_('---- Starting main event loop ----')
app.MainLoop()
print_('---- Exited main event loop ----')
开发者ID:flg8r96,项目名称:eventprocessor,代码行数:17,代码来源:main.py
示例4: main
def main():
idleFns = [] # list of functions to call when 'gui' idle
idleFns.append( onIdle )
try:
thread.start()
print_('starting event loop')
eventLoop = True
while eventLoop:
time.sleep(1) # pretend that main thread does other stuff
for idleFn in idleFns:
idleFn()
except KeyboardInterrupt:
print_('Main interrupted, stopping aux thread')
thread.stop()
except Exception as exc:
from pubsub import py2and3
exc = py2and3.getexcobj()
print_(exc)
print_('Exception, stopping aux thread')
thread.stop()
开发者ID:HelioGuilherme66,项目名称:Phoenix,代码行数:24,代码来源:multithreadloop.py
示例5: __call__
def __call__(self, listenerID):
print_('Exception raised in listener %s during sendMessage()' % listenerID)
print_(TracebackInfo())
开发者ID:2015E8007361074,项目名称:wxPython,代码行数:3,代码来源:exchandle.py
示例6: print_
:copyright: Copyright since 2006 by Oliver Schoenborn, all rights reserved.
:license: BSD, see LICENSE.txt for details.
"""
from pubsub import setuparg1
from pubsub import pub
from pubsub.py2and3 import print_
import notifhandle
import exchandle
import arg1_topics
#***** actual application **********
print_('Using "arg1" messaging protocol of pubsub v3')
try:
print_('------- init ----------')
pub.addTopicDefnProvider( arg1_topics, pub.TOPIC_TREE_FROM_CLASS )
pub.setTopicUnspecifiedFatal()
import arg1_listeners
import arg1_senders as senders
print_('-----------------------')
senders.doSomething1()
senders.doSomething2()
print_('------- done ----------')
开发者ID:2015E8007361074,项目名称:wxPython,代码行数:31,代码来源:main_arg1.py
示例7: onStop
def onStop(self, evt):
print_('----- Timer Stoping PUB')
pub.sendMessage("timer_stopping", amount = 0)
开发者ID:flg8r96,项目名称:pytesting,代码行数:3,代码来源:wx_win2.py
示例8: listenerFn
def listenerFn(msg):
msg, extra = msg.data
print_('Function listenerFn received: ', repr(msg), repr(extra))
开发者ID:2015E8007361074,项目名称:wxPython,代码行数:3,代码来源:console_listeners.py
示例9: onTopic1
def onTopic1(self, msg, topic=pub.AUTO_TOPIC):
msg = msg.data[0]
info = 'Method Listener.onTopic1 received "%s" message: %s'
print_(info % (topic.getName(), repr(msg)))
开发者ID:2015E8007361074,项目名称:wxPython,代码行数:4,代码来源:console_listeners.py
示例10: onRemove
def onRemove(self, evt):
print_('-----')
pub.sendMessage("money_changing", amount = - self.CHANGE)
开发者ID:2015E8007361074,项目名称:wxPython,代码行数:3,代码来源:wx_win2.py
示例11: print_
__author__ = 'matt'
import pubsub
import exithouse
import wx
from pubsub import pub
from pubsub.py2and3 import print_
print_('pubsub API version', pub.VERSION_API)
# notification
from pubsub.utils.notification import useNotifyByWriteFile
import sys
useNotifyByWriteFile(sys.stdout)
# the following two modules don't know about each other yet will
# exchange data via pubsub:
from wx_statuswin import View
from wx_controlwin import ChangerWidget
class Model:
def __init__(self):
print "Main:Model:initializing local variables ... "
self.inhousestate = True
self.motionin_flag = True
self.motionout_flag = True
self.dooropen_flag = False
开发者ID:flg8r96,项目名称:eventprocessor,代码行数:31,代码来源:main.py
示例12: doSomething1
def doSomething1():
print_('--- SENDING topic1.subtopic11 message ---')
pub.sendMessage('topic1.subtopic11', ('message for 11', 123))
print_('---- SENT topic1.subtopic11 message ----')
开发者ID:2015E8007361074,项目名称:wxPython,代码行数:4,代码来源:console_senders.py
示例13: onTopic11
def onTopic11(self, msg):
msg, extra = msg.data
print_('Method Listener.onTopic11 received: ', repr(msg), repr(extra))
开发者ID:2015E8007361074,项目名称:wxPython,代码行数:3,代码来源:console_listeners.py
示例14: doSomething2
def doSomething2():
print_('--- SENDING topic1 message ---')
pub.sendMessage('topic1', ('message for 1',) )
print_('---- SENT topic1 message ----')
开发者ID:2015E8007361074,项目名称:wxPython,代码行数:4,代码来源:console_senders.py
示例15: __call__
def __call__(self, msg):
print_('Listener instance received: ', repr(msg))
开发者ID:2015E8007361074,项目名称:wxPython,代码行数:2,代码来源:console_listeners.py
示例16: print_
"""
Adapted from wxPython website at http://wiki.wxpython.org/ModelViewController/.
:copyright: Copyright since 2006 by Oliver Schoenborn, all rights reserved.
:license: BSD, see LICENSE.txt for details.
"""
import wx
from pubsub import pub
from pubsub.py2and3 import print_
print_('pubsub API version', pub.VERSION_API)
# notification
from pubsub.utils.notification import useNotifyByWriteFile
import sys
useNotifyByWriteFile(sys.stdout)
# the following two modules don't know about each other yet will
# exchange data via pubsub:
from wx_win1 import View
from wx_win2 import ChangerWidget
class Model:
def __init__(self):
self.myMoney = 0
def addMoney(self, value):
开发者ID:infinity77,项目名称:Phoenix,代码行数:31,代码来源:wx_main.py
示例17: onStart
def onStart(self, evt):
print_('----- Timer Starting PUB')
pub.sendMessage("timer_starting", amount = self.initialValue)
开发者ID:flg8r96,项目名称:pytesting,代码行数:3,代码来源:wx_win2.py
注:本文中的pubsub.py2and3.print_函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论