wxnsc.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:SameKeyProxy 作者: xzhou 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号