[英]how to open a shell window output print real time debug information in python
我可以在不中斷代碼執行順序的情況下打開shell窗口以使用python打印調試信息嗎?
例如:
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)
提前致謝。
您可以:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.