![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
lq851643368
这个作者很懒,什么都没留下…
展开
-
python shell中转换文件所在目录
import os os.chkdir(path) 转换到目录path 下 例如:E:\python27\Machine Learning 直接打开为:E:\python27\ os.chdir("/")转到E:\ os.chdir("/python27")转到E:\python27\ os.chdir("/python27/Machine Learning")转原创 2020-04-01 19:44:25 · 148 阅读 · 0 评论 -
windows+python2.7在IDLE中执行sys.exit()出现的问题及解决方案
《简明Python教程》中第13章讲述“异常”时,有这样的一个实例 import sys,os def readfile(filename): '''''Print a file to the standard output.''' f=file(filename) while True: line=f.readline() if len(lin原创 2020-04-01 19:46:17 · 569 阅读 · 0 评论