我可以在python中打开一个用于打印调试信息的shell窗口,而不会破坏代码的执行顺序吗?
例如:
def foo(b):
print b
for a in range(0, 100):
print a # normally this will be used for on-the-fly simple debugging purpose
# and will mess the console output of foo()
foo(a)
我可以这样做:
newshell = <new cmd.exe or bash>
for a in range(0, 100):
newshell.print(a) # information will be printed to new opened shell
foo(a)
提前致谢。
答案 0 :(得分:0)
你可以:
答案 1 :(得分:0)