Python

  python文件目录的转换(转换到D盘),首先要 import os

>>> import os
>>> os.chdir("d:\");

  查看运行的结果:

>>> os.chdir('d:\\')
>>> print os.getcwd();
d:\
>>> os.chdir("d:\\python27\ForTest");

  

 

 

 

 

posted @ 2014-11-29 15:11  子田力亥  阅读(147)  评论(0)    收藏  举报