os模块1 [Python]
时间:2008-10-05 来源:lvDbing
| Tasks | tools |
|
Shell variables |
os.environ |
| Running programs |
os.system os.popen os.popen2/3/4 os.startfile |
| Spawning processes |
os.fork os.pipe os.exec os.waitpid os.kill |
| Descriptor files, locks |
os. open os.read os.write |
| File processing |
os.remove os.rename os.mkfifo os.mkidr os.rmdir |
| Administrative tools |
os.getcwd os.chdir os.chmod os.getpid os.listdir |
| Portability tools |
os.sep os.pathsep os.curdir os.path.split os.path.join |
| Pathname tools |
os.path.exisets('path') os.path.isdir('path') os.path.getsize('path') |
|
[root@lvdbing ~]# python |
WindowsXP
|
Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit (Intel)] on |
可以看到Linux和WindowsXP是不同的.
如何才能知道模块提供的工具如何使用呢,Python使用help()函数可以实时查看帮助文档.
|
>>> help(os) |










