本文整理汇总了Python中application.Application.terminate方法的典型用法代码示例。如果您正苦于以下问题:Python Application.terminate方法的具体用法?Python Application.terminate怎么用?Python Application.terminate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类application.Application
的用法示例。
在下文中一共展示了Application.terminate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: str
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import terminate [as 别名]
userFolder = str(sys.argv[2])
ownIP = str(sys.argv[3])
ownPort = int(sys.argv[4])
bootstrapIP = str(sys.argv[5])
bootstrapPort = int(sys.argv[6])
TCPPortStart = int(sys.argv[7])
TCPPortCount = int(sys.argv[8])
watcherIP = str(sys.argv[9])
else:
userName = "User1" #str(argv[1])
userFolder = "User1/" #str(argv[2])
ownIP = "localhost" #str(argv[3])
ownPort = 50001 #int(argv[4])
bootstrapIP = "localhost" #str(argv[5])
bootstrapPort = 50000 #int(argv[6])
TCPPortStart = 60010 #int(argv[7])
TCPPortCount = 10 #int(argv[8])
watcherIP = "localhost" #str(argv[9])
# initialize and start overlay layer
overlay = Overlay(userName, ownIP, ownPort, bootstrapIP, bootstrapPort, n2o, o2n, a2o, o2a, watcherQ)
application = Application(userFolder, o2a, a2o)
network1 = Network(userFolder, ownIP, ownPort, TCPPortStart, TCPPortCount, n2o, o2n, watcherQ, watcherIP, 2)
network1.run()
while not raw_input() == 'e':
pass
application.terminate()
overlay.terminate()
network1.terminate()