摘要: 在学习和使用python的过程中,少不了要与python idle打交道。但使用python idle都会遇到一个常见而又懊恼的问题——要怎么清屏?我在stackoverflow看到这样两种答案:1.在shell中输入1 import os2 os.system('cls')这种方法只能在windows系统中cmd模式下的python shell 才管用(因为cls的命令是针对cmd的),在python idle直接返回了一个0的值。2.定义一个cls的函数,每次使用输入cls()即可1 def cls(): 2 print "\n" * 100这种方法是伪 阅读全文
posted @ 2013-08-03 00:16 Anth0n 阅读(55363) 评论(13) 推荐(20) 编辑