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 --#
评论列表
文章目录