2013年6月17日
摘要: RBCXF-CVBGR-382MK-DFHJ4-C69G8 阅读全文
posted @ 2013-06-17 16:52 语辰 阅读(379) 评论(0) 推荐(0) 编辑
摘要: Help on function getuser in module getpass:getuser() Get the username from the environment or password database. First try various environment variables, then the password database. This works on Windows as long as USERNAME is set. 阅读全文
posted @ 2013-06-17 16:29 语辰 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 用__file__ 来获得脚本所在的路径,比如文件在/root下cat tee#!/usr/bin/env pythonprint __file__ #得到相对路径tee——————————————————————————————————————import os#!/usr/bin/env pythonprint os.path.realpath(__file__) #得到绝对路径/root/tee 阅读全文
posted @ 2013-06-17 16:01 语辰 阅读(774) 评论(0) 推荐(0) 编辑
摘要: Help on built-in function getcwd in module posix:getcwd(...) getcwd() -> path Return a string representing the current working directory. 阅读全文
posted @ 2013-06-17 15:45 语辰 阅读(446) 评论(0) 推荐(0) 编辑