<jupyter_start><jupyter_text>标准库  1 OS 模块<jupyter_code>import os
os.getcwd()
os.listdir(os.curdir)
os.mkdir('junkdir')
os.listdir(os.curdir)
fp = open('junk.txt','w')
fp.close()
a = os.path.abspath('junk.txt')
print a
os.path.split(a)
os.path.dirname(a)
os.path.basename(a)
os.path.splitext(os.path.basename(a))
os.path.exists(a)
os.path.isfile(a)
os.path.isdir(a)
os.path.join('/User/gaufung/WorkSpace','junk.txt')
os.system('ls')<jupyter_output><empty_output><jupyter_text>环境变量<jupyter_code>os.environ.keys()
os.getenv('PYTHONPATH')<jupyter_output><empty_output><jupyter_text>2 shutil  高效的文件操作  + `shutil.rmtree` 递归的删除文件+ `shutil.move` 递归的移动文件+ `shuilt.copy` 递归的拷贝文件  3 glob高效的文件匹配模式<jupyter_code>import glob
glob.glob('*.ipynb')<jupyter_output><empty_output><jupyter_text>4 Sys系统信息<jupyter_code>import sys
sys.platform
sys.version
sys.prefix
sys.argv<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17214043035107587, 'fraction_numerical': 0.004530011325028313, 'mean_word_length': 8.11340206185567, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '410855', 'license': 'MIT', 'n_tokens_mistral': 435, 'n_tokens_neox': 447, 'n_words': 44, 'path': 'python-statatics-tutorial/basic-theme/python-language/standard_library.ipynb', 'repo_name': 'gaufung/Data_Analytics_Learning_Note', 'size': '883'}