{"id":151,"date":"2015-12-06T14:47:47","date_gmt":"2015-12-06T14:47:47","guid":{"rendered":""},"modified":"2015-12-06T14:47:47","modified_gmt":"2015-12-06T14:47:47","slug":"","status":"publish","type":"post","link":"http:\/\/weizn.net\/?p=151","title":{"rendered":"[\u8f6c]Python\u4e3b\u8981\u6a21\u5757\u548c\u5e38\u7528\u65b9\u6cd5\u7b80\u89c8"},"content":{"rendered":"<pre class=\"prettyprint lang-py linenums\">********************\r\nPY\u6838\u5fc3\u6a21\u5757\u65b9\u6cd5\r\n********************\r\nos\u6a21\u5757:\r\n    os.remove()         \u5220\u9664\u6587\u4ef6 \r\n    os.unlink()         \u5220\u9664\u6587\u4ef6 \r\n    os.rename()         \u91cd\u547d\u540d\u6587\u4ef6 \r\n    os.listdir()        \u5217\u51fa\u6307\u5b9a\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6 \r\n    os.chdir()          \u6539\u53d8\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\r\n    os.getcwd()         \u83b7\u53d6\u5f53\u524d\u6587\u4ef6\u8def\u5f84\r\n    os.mkdir()          \u65b0\u5efa\u76ee\u5f55\r\n    os.rmdir()          \u5220\u9664\u7a7a\u76ee\u5f55(\u5220\u9664\u975e\u7a7a\u76ee\u5f55, \u4f7f\u7528shutil.rmtree())\r\n    os.makedirs()       \u521b\u5efa\u591a\u7ea7\u76ee\u5f55\r\n    os.removedirs()     \u5220\u9664\u591a\u7ea7\u76ee\u5f55\r\n    os.stat(file)       \u83b7\u53d6\u6587\u4ef6\u5c5e\u6027\r\n    os.chmod(file)      \u4fee\u6539\u6587\u4ef6\u6743\u9650\r\n    os.utime(file)      \u4fee\u6539\u6587\u4ef6\u65f6\u95f4\u6233\r\n    os.name(file)       \u83b7\u53d6\u64cd\u4f5c\u7cfb\u7edf\u6807\u8bc6\r\n    os.system()         \u6267\u884c\u64cd\u4f5c\u7cfb\u7edf\u547d\u4ee4\r\n    os.execvp()         \u542f\u52a8\u4e00\u4e2a\u65b0\u8fdb\u7a0b\r\n    os.fork()           \u83b7\u53d6\u7236\u8fdb\u7a0bID\uff0c\u5728\u5b50\u8fdb\u7a0b\u8fd4\u56de\u4e2d\u8fd4\u56de0\r\n    os.execvp()         \u6267\u884c\u5916\u90e8\u7a0b\u5e8f\u811a\u672c\uff08Uinx\uff09\r\n    os.spawn()          \u6267\u884c\u5916\u90e8\u7a0b\u5e8f\u811a\u672c\uff08Windows\uff09\r\n    os.access(path, mode) \u5224\u65ad\u6587\u4ef6\u6743\u9650(\u8be6\u7ec6\u53c2\u8003cnblogs)\r\n    os.wait()           \u6682\u65f6\u672a\u77e5\r\nos.path\u6a21\u5757\uff1a\r\n    os.path.split(filename)         \u5c06\u6587\u4ef6\u8def\u5f84\u548c\u6587\u4ef6\u540d\u5206\u5272(\u4f1a\u5c06\u6700\u540e\u4e00\u4e2a\u76ee\u5f55\u4f5c\u4e3a\u6587\u4ef6\u540d\u800c\u5206\u79bb)\r\n    os.path.splitext(filename)      \u5c06\u6587\u4ef6\u8def\u5f84\u548c\u6587\u4ef6\u6269\u5c55\u540d\u5206\u5272\u6210\u4e00\u4e2a\u5143\u7ec4\r\n    os.path.dirname(filename)       \u8fd4\u56de\u6587\u4ef6\u8def\u5f84\u7684\u76ee\u5f55\u90e8\u5206\r\n    os.path.basename(filename)      \u8fd4\u56de\u6587\u4ef6\u8def\u5f84\u7684\u6587\u4ef6\u540d\u90e8\u5206\r\n    os.path.join(dirname,basename)  \u5c06\u6587\u4ef6\u8def\u5f84\u548c\u6587\u4ef6\u540d\u51d1\u6210\u5b8c\u6574\u6587\u4ef6\u8def\u5f84\r\n    os.path.abspath(name)           \u83b7\u5f97\u7edd\u5bf9\u8def\u5f84\r\n    os.path.splitunc(path)          \u628a\u8def\u5f84\u5206\u5272\u4e3a\u6302\u8f7d\u70b9\u548c\u6587\u4ef6\u540d\r\n    os.path.normpath(path)          \u89c4\u8303path\u5b57\u7b26\u4e32\u5f62\u5f0f\r\n    os.path.exists()                \u5224\u65ad\u6587\u4ef6\u6216\u76ee\u5f55\u662f\u5426\u5b58\u5728\r\n    os.path.isabs()                 \u5982\u679cpath\u662f\u7edd\u5bf9\u8def\u5f84\uff0c\u8fd4\u56deTrue\r\n    os.path.realpath(path)          #\u8fd4\u56depath\u7684\u771f\u5b9e\u8def\u5f84\r\n    os.path.relpath(path[, start])  #\u4ecestart\u5f00\u59cb\u8ba1\u7b97\u76f8\u5bf9\u8def\u5f84   \r\n    os.path.normcase(path)          #\u8f6c\u6362path\u7684\u5927\u5c0f\u5199\u548c\u659c\u6760\r\n    os.path.isdir()                 \u5224\u65adname\u662f\u4e0d\u662f\u4e00\u4e2a\u76ee\u5f55\uff0cname\u4e0d\u662f\u76ee\u5f55\u5c31\u8fd4\u56defalse\r\n    os.path.isfile()                \u5224\u65adname\u662f\u4e0d\u662f\u4e00\u4e2a\u6587\u4ef6\uff0c\u4e0d\u5b58\u5728\u8fd4\u56defalse\r\n    os.path.islink()                \u5224\u65ad\u6587\u4ef6\u662f\u5426\u8fde\u63a5\u6587\u4ef6,\u8fd4\u56deboolean\r\n    os.path.ismount()               \u6307\u5b9a\u8def\u5f84\u662f\u5426\u5b58\u5728\u4e14\u4e3a\u4e00\u4e2a\u6302\u8f7d\u70b9\uff0c\u8fd4\u56deboolean\r\n    os.path.samefile()              \u662f\u5426\u76f8\u540c\u8def\u5f84\u7684\u6587\u4ef6\uff0c\u8fd4\u56deboolean\r\n    os.path.getatime()              \u8fd4\u56de\u6700\u8fd1\u8bbf\u95ee\u65f6\u95f4 \u6d6e\u70b9\u578b\r\n    os.path.getmtime()              \u8fd4\u56de\u4e0a\u4e00\u6b21\u4fee\u6539\u65f6\u95f4 \u6d6e\u70b9\u578b\r\n    os.path.getctime()              \u8fd4\u56de\u6587\u4ef6\u521b\u5efa\u65f6\u95f4 \u6d6e\u70b9\u578b\r\n    os.path.getsize()               \u8fd4\u56de\u6587\u4ef6\u5927\u5c0f \u5b57\u8282\u5355\u4f4d\r\n    os.path.commonprefix(list)      #\u8fd4\u56delist(\u591a\u4e2a\u8def\u5f84)\u4e2d\uff0c\u6240\u6709path\u5171\u6709\u7684\u6700\u957f\u7684\u8def\u5f84\r\n    os.path.lexists                 #\u8def\u5f84\u5b58\u5728\u5219\u8fd4\u56deTrue,\u8def\u5f84\u635f\u574f\u4e5f\u8fd4\u56deTrue\r\n    os.path.expanduser(path)        #\u628apath\u4e2d\u5305\u542b\u7684\"~\"\u548c\"~user\"\u8f6c\u6362\u6210\u7528\u6237\u76ee\u5f55\r\n    os.path.expandvars(path)        #\u6839\u636e\u73af\u5883\u53d8\u91cf\u7684\u503c\u66ff\u6362path\u4e2d\u5305\u542b\u7684\u201d$name\u201d\u548c\u201d${name}\u201d\r\n    os.path.sameopenfile(fp1, fp2)  #\u5224\u65adfp1\u548cfp2\u662f\u5426\u6307\u5411\u540c\u4e00\u6587\u4ef6\r\n    os.path.samestat(stat1, stat2)  #\u5224\u65adstat tuple stat1\u548cstat2\u662f\u5426\u6307\u5411\u540c\u4e00\u4e2a\u6587\u4ef6\r\n    os.path.splitdrive(path)        #\u4e00\u822c\u7528\u5728windows\u4e0b\uff0c\u8fd4\u56de\u9a71\u52a8\u5668\u540d\u548c\u8def\u5f84\u7ec4\u6210\u7684\u5143\u7ec4\r\n    os.path.walk(path, visit, arg)  #\u904d\u5386path\uff0c\u7ed9\u6bcf\u4e2apath\u6267\u884c\u4e00\u4e2a\u51fd\u6570\u8be6\u7ec6\u89c1\u624b\u518c\r\n    os.path.supports_unicode_filenames()     \u8bbe\u7f6e\u662f\u5426\u652f\u6301unicode\u8def\u5f84\u540d\r\nstat\u6a21\u5757\uff1a\r\n    \u63cf\u8ff0os.stat()\u8fd4\u56de\u7684\u6587\u4ef6\u5c5e\u6027\u5217\u8868\u4e2d\u5404\u503c\u7684\u610f\u4e49\r\n    fileStats = os.stat(path)        \u83b7\u53d6\u5230\u7684\u6587\u4ef6\u5c5e\u6027\u5217\u8868\r\n    fileStats[stat.ST_MODE]          \u83b7\u53d6\u6587\u4ef6\u7684\u6a21\u5f0f\r\n    fileStats[stat.ST_SIZE]          \u6587\u4ef6\u5927\u5c0f\r\n    fileStats[stat.ST_MTIME]         \u6587\u4ef6\u6700\u540e\u4fee\u6539\u65f6\u95f4\r\n    fileStats[stat.ST_ATIME]         \u6587\u4ef6\u6700\u540e\u8bbf\u95ee\u65f6\u95f4\r\n    fileStats[stat.ST_CTIME]         \u6587\u4ef6\u521b\u5efa\u65f6\u95f4\r\n    stat.S_ISDIR(fileStats[stat.ST_MODE])       \u662f\u5426\u76ee\u5f55\r\n    stat.S_ISREG(fileStats[stat.ST_MODE])       \u662f\u5426\u4e00\u822c\u6587\u4ef6\r\n    stat.S_ISLNK(fileStats[stat.ST_MODE])       \u662f\u5426\u8fde\u63a5\u6587\u4ef6\r\n    stat.S_ISSOCK(fileStats[stat.ST_MODE])      \u662f\u5426COCK\u6587\u4ef6\r\n    stat.S_ISFIFO(fileStats[stat.ST_MODE])      \u662f\u5426\u547d\u540d\u7ba1\u9053\r\n    stat.S_ISBLK(fileStats[stat.ST_MODE])       \u662f\u5426\u5757\u8bbe\u5907\r\n    stat.S_ISCHR(fileStats[stat.ST_MODE])       \u662f\u5426\u5b57\u7b26\u8bbe\u7f6e\r\nsys\u6a21\u5757\uff1a\r\n    sys.argv                \u547d\u4ee4\u884c\u53c2\u6570List\uff0c\u7b2c\u4e00\u4e2a\u5143\u7d20\u662f\u7a0b\u5e8f\u672c\u8eab\u8def\u5f84 \r\n    sys.path                \u8fd4\u56de\u6a21\u5757\u7684\u641c\u7d22\u8def\u5f84\uff0c\u521d\u59cb\u5316\u65f6\u4f7f\u7528PYTHONPATH\u73af\u5883\u53d8\u91cf\u7684\u503c \r\n    sys.modules.keys()      \u8fd4\u56de\u6240\u6709\u5df2\u7ecf\u5bfc\u5165\u7684\u6a21\u5757\u5217\u8868\r\n    sys.modules             \u8fd4\u56de\u7cfb\u7edf\u5bfc\u5165\u7684\u6a21\u5757\u5b57\u6bb5\uff0ckey\u662f\u6a21\u5757\u540d\uff0cvalue\u662f\u6a21\u5757 \r\n    sys.exc_info()          \u83b7\u53d6\u5f53\u524d\u6b63\u5728\u5904\u7406\u7684\u5f02\u5e38\u7c7b,exc_type\u3001exc_value\u3001exc_traceback\u5f53\u524d\u5904\u7406\u7684\u5f02\u5e38\u8be6\u7ec6\u4fe1\u606f\r\n    sys.exit(n)             \u9000\u51fa\u7a0b\u5e8f\uff0c\u6b63\u5e38\u9000\u51fa\u65f6exit(0)\r\n    sys.hexversion          \u83b7\u53d6Python\u89e3\u91ca\u7a0b\u5e8f\u7684\u7248\u672c\u503c\uff0c16\u8fdb\u5236\u683c\u5f0f\u5982\uff1a0x020403F0\r\n    sys.version             \u83b7\u53d6Python\u89e3\u91ca\u7a0b\u5e8f\u7684\u7248\u672c\u4fe1\u606f\r\n    sys.platform            \u8fd4\u56de\u64cd\u4f5c\u7cfb\u7edf\u5e73\u53f0\u540d\u79f0\r\n    sys.stdout              \u6807\u51c6\u8f93\u51fa\r\n    sys.stdout.write('aaa') \u6807\u51c6\u8f93\u51fa\u5185\u5bb9\r\n    sys.stdout.writelines() \u65e0\u6362\u884c\u8f93\u51fa\r\n    sys.stdin               \u6807\u51c6\u8f93\u5165\r\n    sys.stdin.read()        \u8f93\u5165\u4e00\u884c\r\n    sys.stderr              \u9519\u8bef\u8f93\u51fa\r\n    sys.exc_clear()         \u7528\u6765\u6e05\u9664\u5f53\u524d\u7ebf\u7a0b\u6240\u51fa\u73b0\u7684\u5f53\u524d\u7684\u6216\u6700\u8fd1\u7684\u9519\u8bef\u4fe1\u606f \r\n    sys.exec_prefix         \u8fd4\u56de\u5e73\u53f0\u72ec\u7acb\u7684python\u6587\u4ef6\u5b89\u88c5\u7684\u4f4d\u7f6e \r\n    sys.byteorder           \u672c\u5730\u5b57\u8282\u89c4\u5219\u7684\u6307\u793a\u5668\uff0cbig-endian\u5e73\u53f0\u7684\u503c\u662f'big',little-endian\u5e73\u53f0\u7684\u503c\u662f'little' \r\n    sys.copyright           \u8bb0\u5f55python\u7248\u6743\u76f8\u5173\u7684\u4e1c\u897f \r\n    sys.api_version         \u89e3\u91ca\u5668\u7684C\u7684API\u7248\u672c \r\n    sys.version_info        'final'\u8868\u793a\u6700\u7ec8,\u4e5f\u6709'candidate'\u8868\u793a\u5019\u9009\uff0c\u8868\u793a\u7248\u672c\u7ea7\u522b\uff0c\u662f\u5426\u6709\u540e\u7ee7\u7684\u53d1\u884c \r\n    sys.getdefaultencoding()        \u8fd4\u56de\u5f53\u524d\u4f60\u6240\u7528\u7684\u9ed8\u8ba4\u7684\u5b57\u7b26\u7f16\u7801\u683c\u5f0f \r\n    sys.getfilesystemencoding()     \u8fd4\u56de\u5c06Unicode\u6587\u4ef6\u540d\u8f6c\u6362\u6210\u7cfb\u7edf\u6587\u4ef6\u540d\u7684\u7f16\u7801\u7684\u540d\u5b57 \r\n    sys.builtin_module_names        Python\u89e3\u91ca\u5668\u5bfc\u5165\u7684\u5185\u5efa\u6a21\u5757\u5217\u8868 \r\n    sys.executable                  Python\u89e3\u91ca\u7a0b\u5e8f\u8def\u5f84 \r\n    sys.getwindowsversion()         \u83b7\u53d6Windows\u7684\u7248\u672c \r\n    sys.stdin.readline()            \u4ece\u6807\u51c6\u8f93\u5165\u8bfb\u4e00\u884c\uff0csys.stdout.write(\"a\") \u5c4f\u5e55\u8f93\u51faa\r\n    sys.setdefaultencoding(name)    \u7528\u6765\u8bbe\u7f6e\u5f53\u524d\u9ed8\u8ba4\u7684\u5b57\u7b26\u7f16\u7801(\u8be6\u7ec6\u4f7f\u7528\u53c2\u8003\u6587\u6863) \r\n    sys.displayhook(value)          \u5982\u679cvalue\u975e\u7a7a\uff0c\u8fd9\u4e2a\u51fd\u6570\u4f1a\u628a\u4ed6\u8f93\u51fa\u5230sys.stdout(\u8be6\u7ec6\u4f7f\u7528\u53c2\u8003\u6587\u6863)\r\n\r\ndatetime,date,time\u6a21\u5757\uff1a\r\n    datetime.date.today()           \u672c\u5730\u65e5\u671f\u5bf9\u8c61,(\u7528str\u51fd\u6570\u53ef\u5f97\u5230\u5b83\u7684\u5b57\u9762\u8868\u793a(2014-03-24))\r\n    datetime.date.isoformat(obj)    \u5f53\u524d[\u5e74-\u6708-\u65e5]\u5b57\u7b26\u4e32\u8868\u793a(2014-03-24)\r\n    datetime.date.fromtimestamp()   \u8fd4\u56de\u4e00\u4e2a\u65e5\u671f\u5bf9\u8c61\uff0c\u53c2\u6570\u662f\u65f6\u95f4\u6233,\u8fd4\u56de [\u5e74-\u6708-\u65e5]\r\n    datetime.date.weekday(obj)      \u8fd4\u56de\u4e00\u4e2a\u65e5\u671f\u5bf9\u8c61\u7684\u661f\u671f\u6570,\u5468\u4e00\u662f0\r\n    datetime.date.isoweekday(obj)   \u8fd4\u56de\u4e00\u4e2a\u65e5\u671f\u5bf9\u8c61\u7684\u661f\u671f\u6570,\u5468\u4e00\u662f1\r\n    datetime.date.isocalendar(obj)  \u628a\u65e5\u671f\u5bf9\u8c61\u8fd4\u56de\u4e00\u4e2a\u5e26\u6709\u5e74\u6708\u65e5\u7684\u5143\u7ec4\r\n    datetime\u5bf9\u8c61\uff1a\r\n    datetime.datetime.today()       \u8fd4\u56de\u4e00\u4e2a\u5305\u542b\u672c\u5730\u65f6\u95f4(\u542b\u5fae\u79d2\u6570)\u7684datetime\u5bf9\u8c61 2014-03-24 23:31:50.419000\r\n    datetime.datetime.now([tz])     \u8fd4\u56de\u6307\u5b9a\u65f6\u533a\u7684datetime\u5bf9\u8c61 2014-03-24 23:31:50.419000\r\n    datetime.datetime.utcnow()      \u8fd4\u56de\u4e00\u4e2a\u96f6\u65f6\u533a\u7684datetime\u5bf9\u8c61\r\n    datetime.fromtimestamp(timestamp[,tz])      \u6309\u65f6\u95f4\u6233\u8fd4\u56de\u4e00\u4e2adatetime\u5bf9\u8c61\uff0c\u53ef\u6307\u5b9a\u65f6\u533a,\u53ef\u7528\u4e8estrftime\u8f6c\u6362\u4e3a\u65e5\u671f\u8868\u793a \r\n    datetime.utcfromtimestamp(timestamp)        \u6309\u65f6\u95f4\u6233\u8fd4\u56de\u4e00\u4e2aUTC-datetime\u5bf9\u8c61\r\n    datetime.datetime.strptime('2014-03-16 12:21:21',\"%Y-%m-%d %H:%M:%S\") \u5c06\u5b57\u7b26\u4e32\u8f6c\u4e3adatetime\u5bf9\u8c61\r\n    datetime.datetime.strftime(datetime.datetime.now(), '%Y%m%d %H%M%S') \u5c06datetime\u5bf9\u8c61\u8f6c\u6362\u4e3astr\u8868\u793a\u5f62\u5f0f\r\n    datetime.date.today().timetuple()           \u8f6c\u6362\u4e3a\u65f6\u95f4\u6233datetime\u5143\u7ec4\u5bf9\u8c61\uff0c\u53ef\u7528\u4e8e\u8f6c\u6362\u65f6\u95f4\u6233\r\n    datetime.datetime.now().timetuple()\r\n    time.mktime(timetupleobj)                   \u5c06datetime\u5143\u7ec4\u5bf9\u8c61\u8f6c\u4e3a\u65f6\u95f4\u6233\r\n    time.time()                     \u5f53\u524d\u65f6\u95f4\u6233\r\n    time.localtime\r\n    time.gmtime\r\n\r\n    \r\nhashlib,md5\u6a21\u5757\uff1a\r\n    hashlib.md5('md5_str').hexdigest()      \u5bf9\u6307\u5b9a\u5b57\u7b26\u4e32md5\u52a0\u5bc6\r\n    md5.md5('md5_str').hexdigest()          \u5bf9\u6307\u5b9a\u5b57\u7b26\u4e32md5\u52a0\u5bc6\r\n    \r\nrandom\u6a21\u5757\uff1a\r\n    random.random()             \u4ea7\u751f0-1\u7684\u968f\u673a\u6d6e\u70b9\u6570\r\n    random.uniform(a, b)        \u4ea7\u751f\u6307\u5b9a\u8303\u56f4\u5185\u7684\u968f\u673a\u6d6e\u70b9\u6570\r\n    random.randint(a, b)        \u4ea7\u751f\u6307\u5b9a\u8303\u56f4\u5185\u7684\u968f\u673a\u6574\u6570\r\n    random.randrange([start], stop[, step]) \u4ece\u4e00\u4e2a\u6307\u5b9a\u6b65\u957f\u7684\u96c6\u5408\u4e2d\u4ea7\u751f\u968f\u673a\u6570\r\n    random.choice(sequence)     \u4ece\u5e8f\u5217\u4e2d\u4ea7\u751f\u4e00\u4e2a\u968f\u673a\u6570\r\n    random.shuffle(x[, random]) \u5c06\u4e00\u4e2a\u5217\u8868\u4e2d\u7684\u5143\u7d20\u6253\u4e71\r\n    random.sample(sequence, k)  \u4ece\u5e8f\u5217\u4e2d\u968f\u673a\u83b7\u53d6\u6307\u5b9a\u957f\u5ea6\u7684\u7247\u65ad\r\n \r\ntypes\u6a21\u5757\uff1a\r\n    \u4fdd\u5b58\u4e86\u6240\u6709\u6570\u636e\u7c7b\u578b\u540d\u79f0\u3002\r\n    if type('1111') == types.StringType:\r\nMySQLdb\u6a21\u5757\uff1a\r\n    MySQLdb.get_client_info()           \u83b7\u53d6API\u7248\u672c\r\n    MySQLdb.Binary('string')            \u8f6c\u4e3a\u4e8c\u8fdb\u5236\u6570\u636e\u5f62\u5f0f\r\n    MySQLdb.escape_string('str')        \u9488\u5bf9mysql\u7684\u5b57\u7b26\u8f6c\u4e49\u51fd\u6570\r\n    MySQLdb.DateFromTicks(1395842548)   \u628a\u65f6\u95f4\u6233\u8f6c\u4e3adatetime.date\u5bf9\u8c61\u5b9e\u4f8b\r\n    MySQLdb.TimestampFromTicks(1395842548)   \u628a\u65f6\u95f4\u6233\u8f6c\u4e3adatetime.datetime\u5bf9\u8c61\u5b9e\u4f8b\r\n    MySQLdb.string_literal('str')       \u5b57\u7b26\u8f6c\u4e49\r\n    MySQLdb.cursor()\u6e38\u6807\u5bf9\u8c61\u4e0a\u7684\u65b9\u6cd5\uff1a\u300apython\u6838\u5fc3\u7f16\u7a0b\u300bP624\r\n    \r\natexit\u6a21\u5757\uff1a\r\n    atexit.register(fun,args,args2..)   \u6ce8\u518c\u51fd\u6570func\uff0c\u5728\u89e3\u6790\u5668\u9000\u51fa\u524d\u8c03\u7528\u8be5\u51fd\u6570\r\n\r\n    \r\nstring\u6a21\u5757\uff1a\r\n    str.capitalize()            \u628a\u5b57\u7b26\u4e32\u7684\u7b2c\u4e00\u4e2a\u5b57\u7b26\u5927\u5199\r\n    str.center(width)           \u8fd4\u56de\u4e00\u4e2a\u539f\u5b57\u7b26\u4e32\u5c45\u4e2d\uff0c\u5e76\u4f7f\u7528\u7a7a\u683c\u586b\u5145\u5230width\u957f\u5ea6\u7684\u65b0\u5b57\u7b26\u4e32\r\n    str.ljust(width)            \u8fd4\u56de\u4e00\u4e2a\u539f\u5b57\u7b26\u4e32\u5de6\u5bf9\u9f50\uff0c\u7528\u7a7a\u683c\u586b\u5145\u5230\u6307\u5b9a\u957f\u5ea6\u7684\u65b0\u5b57\u7b26\u4e32\r\n    str.rjust(width)            \u8fd4\u56de\u4e00\u4e2a\u539f\u5b57\u7b26\u4e32\u53f3\u5bf9\u9f50\uff0c\u7528\u7a7a\u683c\u586b\u5145\u5230\u6307\u5b9a\u957f\u5ea6\u7684\u65b0\u5b57\u7b26\u4e32\r\n    str.zfill(width)            \u8fd4\u56de\u5b57\u7b26\u4e32\u53f3\u5bf9\u9f50\uff0c\u524d\u9762\u75280\u586b\u5145\u5230\u6307\u5b9a\u957f\u5ea6\u7684\u65b0\u5b57\u7b26\u4e32\r\n    str.count(str,[beg,len])    \u8fd4\u56de\u5b50\u5b57\u7b26\u4e32\u5728\u539f\u5b57\u7b26\u4e32\u51fa\u73b0\u6b21\u6570\uff0cbeg,len\u662f\u8303\u56f4\r\n    str.decode(encodeing[,replace]) \u89e3\u7801string,\u51fa\u9519\u5f15\u53d1ValueError\u5f02\u5e38\r\n    str.encode(encodeing[,replace]) \u89e3\u7801string\r\n    str.endswith(substr[,beg,end])  \u5b57\u7b26\u4e32\u662f\u5426\u4ee5substr\u7ed3\u675f\uff0cbeg,end\u662f\u8303\u56f4\r\n    str.startswith(substr[,beg,end])  \u5b57\u7b26\u4e32\u662f\u5426\u4ee5substr\u5f00\u5934\uff0cbeg,end\u662f\u8303\u56f4\r\n    str.expandtabs(tabsize = 8)     \u628a\u5b57\u7b26\u4e32\u7684tab\u8f6c\u4e3a\u7a7a\u683c\uff0c\u9ed8\u8ba4\u4e3a8\u4e2a\r\n    str.find(str,[stat,end])        \u67e5\u627e\u5b50\u5b57\u7b26\u4e32\u5728\u5b57\u7b26\u4e32\u7b2c\u4e00\u6b21\u51fa\u73b0\u7684\u4f4d\u7f6e\uff0c\u5426\u5219\u8fd4\u56de-1\r\n    str.index(str,[beg,end])        \u67e5\u627e\u5b50\u5b57\u7b26\u4e32\u5728\u6307\u5b9a\u5b57\u7b26\u4e2d\u7684\u4f4d\u7f6e\uff0c\u4e0d\u5b58\u5728\u62a5\u5f02\u5e38\r\n    str.isalnum()               \u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u5b57\u6bcd\u548c\u6570\u5b57\u7ec4\u6210\uff0c\u662f\u8fd4\u56detrue\u5426\u5219False\r\n    str.isalpha()               \u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7eaf\u5b57\u6bcd\u7ec4\u6210\uff0c\u662f\u8fd4\u56detrue,\u5426\u5219false\r\n    str.isdecimal()             \u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7eaf\u5341\u8fdb\u5236\u6570\u5b57\u7ec4\u6210\uff0c\u8fd4\u56de\u5e03\u5c14\u503c\r\n    str.isdigit()               \u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7eaf\u6570\u5b57\u7ec4\u6210\uff0c\u8fd4\u56de\u5e03\u5c14\u503c\r\n    str.islower()               \u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u5168\u662f\u5c0f\u5199\uff0c\u8fd4\u56de\u5e03\u5c14\u503c\r\n    str.isupper()               \u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u5168\u662f\u5927\u5199\uff0c\u8fd4\u56de\u5e03\u5c14\u503c\r\n    str.isnumeric()             \u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u53ea\u5305\u542b\u6570\u5b57\u5b57\u7b26\uff0c\u8fd4\u56de\u5e03\u5c14\u503c\r\n    str.isspace()               \u5982\u679cstr\u4e2d\u53ea\u5305\u542b\u7a7a\u683c\uff0c\u5219\u8fd4\u56detrue,\u5426\u5219FALSE\r\n    str.title()                 \u8fd4\u56de\u6807\u9898\u5316\u7684\u5b57\u7b26\u4e32\uff08\u6240\u6709\u5355\u8bcd\u9996\u5b57\u6bcd\u5927\u5199\uff0c\u5176\u4f59\u5c0f\u5199\uff09\r\n    str.istitle()               \u5982\u679c\u5b57\u7b26\u4e32\u662f\u6807\u9898\u5316\u7684(\u53c2\u89c1title())\u5219\u8fd4\u56detrue,\u5426\u5219false\r\n    str.join(seq)               \u4ee5str\u4f5c\u4e3a\u8fde\u63a5\u7b26\uff0c\u5c06\u4e00\u4e2a\u5e8f\u5217\u4e2d\u7684\u5143\u7d20\u8fde\u63a5\u6210\u5b57\u7b26\u4e32\r\n    str.split(str='',num)       \u4ee5str\u4f5c\u4e3a\u5206\u9694\u7b26\uff0c\u5c06\u4e00\u4e2a\u5b57\u7b26\u4e32\u5206\u9694\u6210\u4e00\u4e2a\u5e8f\u5217\uff0cnum\u662f\u88ab\u5206\u9694\u7684\u5b57\u7b26\u4e32\r\n    str.splitlines(num)         \u4ee5\u884c\u5206\u9694\uff0c\u8fd4\u56de\u5404\u884c\u5185\u5bb9\u4f5c\u4e3a\u5143\u7d20\u7684\u5217\u8868\r\n    str.lower()                 \u5c06\u5927\u5199\u8f6c\u4e3a\u5c0f\u5199\r\n    str.upper()                 \u8f6c\u6362\u5b57\u7b26\u4e32\u7684\u5c0f\u5199\u4e3a\u5927\u5199\r\n    str.swapcase()              \u7ffb\u6362\u5b57\u7b26\u4e32\u7684\u5927\u5c0f\u5199\r\n    str.lstrip()                \u53bb\u6389\u5b57\u7b26\u5de6\u8fb9\u7684\u7a7a\u683c\u548c\u56de\u8f66\u6362\u884c\u7b26\r\n    str.rstrip()                \u53bb\u6389\u5b57\u7b26\u53f3\u8fb9\u7684\u7a7a\u683c\u548c\u56de\u8f66\u6362\u884c\u7b26\r\n    str.strip()                 \u53bb\u6389\u5b57\u7b26\u4e24\u8fb9\u7684\u7a7a\u683c\u548c\u56de\u8f66\u6362\u884c\u7b26\r\n    str.partition(substr)       \u4ecesubstr\u51fa\u73b0\u7684\u7b2c\u4e00\u4e2a\u4f4d\u7f6e\u8d77\uff0c\u5c06str\u5206\u5272\u6210\u4e00\u4e2a3\u5143\u7ec4\u3002\r\n    str.replace(str1,str2,num)  \u67e5\u627estr1\u66ff\u6362\u6210str2\uff0cnum\u662f\u66ff\u6362\u6b21\u6570\r\n    str.rfind(str[,beg,end])    \u4ece\u53f3\u8fb9\u5f00\u59cb\u67e5\u8be2\u5b50\u5b57\u7b26\u4e32\r\n    str.rindex(str,[beg,end])   \u4ece\u53f3\u8fb9\u5f00\u59cb\u67e5\u627e\u5b50\u5b57\u7b26\u4e32\u4f4d\u7f6e \r\n    str.rpartition(str)         \u7c7b\u4f3cpartition\u51fd\u6570\uff0c\u4e0d\u8fc7\u4ece\u53f3\u8fb9\u5f00\u59cb\u67e5\u627e\r\n    str.translate(str,del='')   \u6309str\u7ed9\u51fa\u7684\u8868\u8f6c\u6362string\u7684\u5b57\u7b26\uff0cdel\u662f\u8981\u8fc7\u8651\u7684\u5b57\u7b26\r\n    \r\nurllib\u6a21\u5757\uff1a\r\n    urllib.quote(string[,safe])             \u5bf9\u5b57\u7b26\u4e32\u8fdb\u884c\u7f16\u7801\u3002\u53c2\u6570safe\u6307\u5b9a\u4e86\u4e0d\u9700\u8981\u7f16\u7801\u7684\u5b57\u7b26\r\n    urllib.unquote(string)                  \u5bf9\u5b57\u7b26\u4e32\u8fdb\u884c\u89e3\u7801\r\n    urllib.quote_plus(string[,safe])        \u4e0eurllib.quote\u7c7b\u4f3c\uff0c\u4f46\u8fd9\u4e2a\u65b9\u6cd5\u7528'+'\u6765\u66ff\u6362' '\uff0c\u800cquote\u7528'%20'\u6765\u4ee3\u66ff' '\r\n    urllib.unquote_plus(string )            \u5bf9\u5b57\u7b26\u4e32\u8fdb\u884c\u89e3\u7801\r\n    urllib.urlencode(query[,doseq])         \u5c06dict\u6216\u8005\u5305\u542b\u4e24\u4e2a\u5143\u7d20\u7684\u5143\u7ec4\u5217\u8868\u8f6c\u6362\u6210url\u53c2\u6570\u3002\r\n                                            \u4f8b\u5982 \u5b57\u5178{'name':'wklken','pwd':'123'}\u5c06\u88ab\u8f6c\u6362\u4e3a\"name=wklken&amp;pwd=123\"\r\n    urllib.pathname2url(path)               \u5c06\u672c\u5730\u8def\u5f84\u8f6c\u6362\u6210url\u8def\u5f84\r\n    urllib.url2pathname(path)               \u5c06url\u8def\u5f84\u8f6c\u6362\u6210\u672c\u5730\u8def\u5f84\r\n    urllib.urlretrieve(url[,filename[,reporthook[,data]]])  \u4e0b\u8f7d\u8fdc\u7a0b\u6570\u636e\u5230\u672c\u5730\r\n        filename\uff1a\u6307\u5b9a\u4fdd\u5b58\u5230\u672c\u5730\u7684\u8def\u5f84\uff08\u82e5\u672a\u6307\u5b9a\u8be5\uff0curllib\u751f\u6210\u4e00\u4e2a\u4e34\u65f6\u6587\u4ef6\u4fdd\u5b58\u6570\u636e\uff09\r\n        reporthook\uff1a\u56de\u8c03\u51fd\u6570\uff0c\u5f53\u8fde\u63a5\u4e0a\u670d\u52a1\u5668\u3001\u4ee5\u53ca\u76f8\u5e94\u7684\u6570\u636e\u5757\u4f20\u8f93\u5b8c\u6bd5\u7684\u65f6\u5019\u4f1a\u89e6\u53d1\u8be5\u56de\u8c03\r\n        data\uff1a\u6307post\u5230\u670d\u52a1\u5668\u7684\u6570\u636e\r\n    rulrs = urllib.urlopen(url[,data[,proxies]])     \u6293\u53d6\u7f51\u9875\u4fe1\u606f\uff0c[data]post\u6570\u636e\u5230Url,proxies\u8bbe\u7f6e\u7684\u4ee3\u7406\r\n    urlrs.readline()    \u8ddf\u6587\u4ef6\u5bf9\u8c61\u4f7f\u7528\u4e00\u6837\r\n    urlrs.readlines()   \u8ddf\u6587\u4ef6\u5bf9\u8c61\u4f7f\u7528\u4e00\u6837\r\n    urlrs.fileno()      \u8ddf\u6587\u4ef6\u5bf9\u8c61\u4f7f\u7528\u4e00\u6837\r\n    urlrs.close()       \u8ddf\u6587\u4ef6\u5bf9\u8c61\u4f7f\u7528\u4e00\u6837\r\n    urlrs.info()        \u8fd4\u56de\u4e00\u4e2ahttplib.HTTPMessage\u5bf9\u8c61\uff0c\u8868\u793a\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd4\u56de\u7684\u5934\u4fe1\u606f\r\n    urlrs.getcode()     \u83b7\u53d6\u8bf7\u6c42\u8fd4\u56de\u72b6\u6001HTTP\u72b6\u6001\u7801\r\n    urlrs.geturl()      \u8fd4\u56de\u8bf7\u6c42\u7684URL\r\n\r\nurllib2\u6a21\u5757\uff1a\r\nurlparse\u6a21\u5757\uff1a    \r\n    \r\n    \r\nre\u6a21\u5757\uff1a\r\n    \u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5757\u51fd\u6570\uff1a\u300apython\u6838\u5fc3\u7f16\u7a0b\u300bP472\r\nmath,cmath\u6a21\u5757\uff1a\r\n    \u6570\u5b66\u8fd0\u7b97\uff0c\u590d\u6570\u8fd0\u7b97\u51fd\u6570\r\noperator\u6a21\u5757:\r\n    \u4e00\u4e9b\u6570\u503c\u64cd\u4f5c\u51fd\u6570\u96c6\u5408\u3002\u53c2\u8003CSDN\u6536\u85cf\r\ncopy\u6a21\u5757\uff1a\r\n    copy.copy(a)        \u590d\u5236\u5bf9\u8c61\r\n    copy.deepcopy(a)    \u590d\u5236\u96c6\u5408\r\n\r\nfileinput \u6a21\u5757\uff1a\r\n    \u5904\u7406\u6587\u4ef6\u5185\u5bb9\u6a21\u5757\r\nshutil \u6a21\u5757\uff1a\r\n    \u5305\u542b\u4e00\u4e9b\u590d\u5236\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u7684\u51fd\u6570\uff1a\r\n        \r\n    \r\n        \r\n  \r\n\r\n\r\n\r\n\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<pre class=\"prettyprint lang-py linenums\">********************\r\nPY\u6838\u5fc3\u6a21\u5757\u65b9\u6cd5\r\n********************\r\nos\u6a21\u5757:\r\n    os.remove()         \u5220\u9664\u6587\u4ef6 \r\n    os.unlink()         \u5220\u9664\u6587\u4ef6 \r\n    os.rename()         \u91cd\u547d\u540d\u6587\u4ef6 \r\n    os.listdir()        \u5217\u51fa\u6307\u5b9a\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6 \r\n    os....<\/pre>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[334],"tags":[],"class_list":["post-151","post","type-post","status-publish","format-standard","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[\u8f6c]Python\u4e3b\u8981\u6a21\u5757\u548c\u5e38\u7528\u65b9\u6cd5\u7b80\u89c8 - Wayne&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/weizn.net\/?p=151\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[\u8f6c]Python\u4e3b\u8981\u6a21\u5757\u548c\u5e38\u7528\u65b9\u6cd5\u7b80\u89c8 - Wayne&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"******************** PY\u6838\u5fc3\u6a21\u5757\u65b9\u6cd5 ******************** os\u6a21\u5757:   os.remove()     \u5220\u9664\u6587\u4ef6    os.unlink()     \u5220\u9664\u6587\u4ef6    os.rename()     \u91cd\u547d\u540d\u6587\u4ef6    os.listdir()    \u5217\u51fa\u6307\u5b9a\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6    os....\" \/>\n<meta property=\"og:url\" content=\"http:\/\/weizn.net\/?p=151\" \/>\n<meta property=\"og:site_name\" content=\"Wayne&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-06T14:47:47+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"zinan\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/weizn.net\/#website\",\"url\":\"http:\/\/weizn.net\/\",\"name\":\"Wayne&#039;s Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/weizn.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/weizn.net\/?p=151#webpage\",\"url\":\"http:\/\/weizn.net\/?p=151\",\"name\":\"[\\u8f6c]Python\\u4e3b\\u8981\\u6a21\\u5757\\u548c\\u5e38\\u7528\\u65b9\\u6cd5\\u7b80\\u89c8 - Wayne&#039;s Blog\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/#website\"},\"datePublished\":\"2015-12-06T14:47:47+00:00\",\"dateModified\":\"2015-12-06T14:47:47+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/weizn.net\/?p=151#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/weizn.net\/?p=151\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/weizn.net\/?p=151#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\\u9996\\u9875\",\"item\":\"http:\/\/weizn.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[\\u8f6c]Python\\u4e3b\\u8981\\u6a21\\u5757\\u548c\\u5e38\\u7528\\u65b9\\u6cd5\\u7b80\\u89c8\"}]},{\"@type\":\"Article\",\"@id\":\"http:\/\/weizn.net\/?p=151#article\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/?p=151#webpage\"},\"author\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"headline\":\"[\\u8f6c]Python\\u4e3b\\u8981\\u6a21\\u5757\\u548c\\u5e38\\u7528\\u65b9\\u6cd5\\u7b80\\u89c8\",\"datePublished\":\"2015-12-06T14:47:47+00:00\",\"dateModified\":\"2015-12-06T14:47:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/weizn.net\/?p=151#webpage\"},\"wordCount\":1,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"articleSection\":[\"Python\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/weizn.net\/?p=151#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\",\"name\":\"zinan\",\"logo\":{\"@id\":\"http:\/\/weizn.net\/#personlogo\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[\u8f6c]Python\u4e3b\u8981\u6a21\u5757\u548c\u5e38\u7528\u65b9\u6cd5\u7b80\u89c8 - Wayne&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/weizn.net\/?p=151","og_locale":"zh_CN","og_type":"article","og_title":"[\u8f6c]Python\u4e3b\u8981\u6a21\u5757\u548c\u5e38\u7528\u65b9\u6cd5\u7b80\u89c8 - Wayne&#039;s Blog","og_description":"******************** PY\u6838\u5fc3\u6a21\u5757\u65b9\u6cd5 ******************** os\u6a21\u5757:   os.remove()     \u5220\u9664\u6587\u4ef6    os.unlink()     \u5220\u9664\u6587\u4ef6    os.rename()     \u91cd\u547d\u540d\u6587\u4ef6    os.listdir()    \u5217\u51fa\u6307\u5b9a\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6    os....","og_url":"http:\/\/weizn.net\/?p=151","og_site_name":"Wayne&#039;s Blog","article_published_time":"2015-12-06T14:47:47+00:00","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"zinan","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"http:\/\/weizn.net\/#website","url":"http:\/\/weizn.net\/","name":"Wayne&#039;s Blog","description":"","publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/weizn.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"http:\/\/weizn.net\/?p=151#webpage","url":"http:\/\/weizn.net\/?p=151","name":"[\u8f6c]Python\u4e3b\u8981\u6a21\u5757\u548c\u5e38\u7528\u65b9\u6cd5\u7b80\u89c8 - Wayne&#039;s Blog","isPartOf":{"@id":"http:\/\/weizn.net\/#website"},"datePublished":"2015-12-06T14:47:47+00:00","dateModified":"2015-12-06T14:47:47+00:00","breadcrumb":{"@id":"http:\/\/weizn.net\/?p=151#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/weizn.net\/?p=151"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/weizn.net\/?p=151#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/weizn.net\/"},{"@type":"ListItem","position":2,"name":"[\u8f6c]Python\u4e3b\u8981\u6a21\u5757\u548c\u5e38\u7528\u65b9\u6cd5\u7b80\u89c8"}]},{"@type":"Article","@id":"http:\/\/weizn.net\/?p=151#article","isPartOf":{"@id":"http:\/\/weizn.net\/?p=151#webpage"},"author":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"headline":"[\u8f6c]Python\u4e3b\u8981\u6a21\u5757\u548c\u5e38\u7528\u65b9\u6cd5\u7b80\u89c8","datePublished":"2015-12-06T14:47:47+00:00","dateModified":"2015-12-06T14:47:47+00:00","mainEntityOfPage":{"@id":"http:\/\/weizn.net\/?p=151#webpage"},"wordCount":1,"commentCount":0,"publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"articleSection":["Python"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/weizn.net\/?p=151#respond"]}]},{"@type":["Person","Organization"],"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264","name":"zinan","logo":{"@id":"http:\/\/weizn.net\/#personlogo"}}]}},"_links":{"self":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=151"}],"version-history":[{"count":0,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/151\/revisions"}],"wp:attachment":[{"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=151"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}