wxnsc.py 文件源码

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

项目:SameKeyProxy 作者: xzhou 项目源码 文件源码
def __init__(self, nsHost, nsPort, bcAddr):
      """
      :Parameters:
         - `nsHost`: the name server host to connect to. This is the
                     name of the host or the ip.
         - `nsPort`: the name server port. By default the Pyro name
                     server port is 9090
         - `bcAddr`: override for the broadcast address.
      """
      wx.Frame.__init__(self, None, -1, 'Pyro Name Server')
      self.nsHost           = nsHost
      self.nsPort           = nsPort
      self.bcAddr           = bcAddr
      self.NS               = None

      self._build()
      imageList = wx.ImageList(16,16)
      self.__idGroup = imageList.Add(wx.BitmapFromXPMData(GROUP_XPM))
      self.__idItem  = imageList.Add(wx.BitmapFromXPMData(ITEM_XPM))
      self.__idGroupOpen = imageList.Add(wx.BitmapFromXPMData(GROUP_OPEN_XPM))
      self.treeCtrlItems.SetImageList(imageList)
      self.__imageList = imageList

      self._bindEvents()
      # binding stdout to my own txtCtrl Log.
      sys.stdout = self.txtCtrlLog

      self._log("Pyro version: "+Pyro.constants.VERSION)

      self.nsc_findNS()
      if self.NS: self.update()

   #-- public methods --#
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号