【发布时间】:2013-07-01 13:30:05
【问题描述】:
我知道这是一个简单的问题,但我做不到。我必须做两件事。其中之一是将管理程序的管理程序,例如停止、暂停、恢复。另一件事只会显示日志。所以我需要2个控制台。
如何打开两个控制台?
如何将日志从管理控制台传递到日志记录控制台。示例代码如下:
if __name__ == '__main__':
try:
while True:
initialmyProgram()
print('Please press \'1\' key to stop program..\n')
print('Please press \'5\' key to resume program..\n')
print('Please press \'0\' key to exit program..\n')
isStart = raw_input('Please press a key that must be in above list..')
if isStart == 1:
parse.__is__process__ = False
elif isStart == 5:
parse.__is__process__ = True
elif isStart == 0 :
exit_program()
else:
continue
except Exception as ex:
logging.info('log..') #this log will write other console..
【问题讨论】:
-
不,我有两个模块。
-
我不确定这是否可能。您想从终端启动一个程序,并希望它为您打开一个额外的终端?
-
是的,正是我要你说的。
标签: python