def main(argv):
"""
The default host will be None if the environment variable
PYRO_NS_HOSTNAME is not set.
The default port will be 9090 (Pyro.config.PYRO_NS_PORT) if
PYRO_NS_BC_PORT environment variable is not set.
"""
nsHost = os.getenv('PYRO_NS_HOSTNAME')
nsPort = os.getenv('PYRO_NS_BC_PORT') or Pyro.config.PYRO_NS_PORT
bcAddr = Pyro.config.PYRO_NS_BC_ADDR
if bcAddr:
bcAddr=bcAddr.strip()
bcAddr=bcAddr or None
class wx_NSCApp(wx.App):
def OnInit(self):
Pyro.core.initClient()
frame = wx_NSC(nsHost, nsPort, bcAddr)
frame.SetSize(wx.Size(630,500))
frame.Show(True)
return True
app = wx_NSCApp(0)
app.MainLoop()
# allow easy usage with python -m
评论列表
文章目录