import os
print(os.getcwd())
os.chdir('C:\\Users\\Lenovo\\PycharmProjects\\untitled')
print(os.getcwd())
os.chdir(r'C:\Users\Lenovo\PycharmProjects')
print(os.getcwd())
print(os.listdir('.'))
print(os.stat(r'C:\Users\Lenovo\PycharmProjects\新目录'))
print(os.sep)
print(os.pathsep)
print(os.environ)
print(os.name)
os.system('dir')
print(__file__)
print(os.path.abspath(__file__))
print(os.path.split(r'C:\Users\Lenovo\PycharmProjects\新目录\5os模块.py'))
print(os.path.dirname(os.path.abspath(__file__)))
print(os.path.basename(os.path.abspath(__file__)))
print(os.path.exists(r'C:\Users\Lenovo\PycharmProjects\新目录\5os模块.py'))
print(os.path.isabs(r'/l'))
print(os.path.isfile(r'C:\Users\Lenovo\PycharmProjects\新目录'))
print(os.path.isdir(r'C:\Users\Lenovo\PycharmProjects\新目录'))
print(os.path.join('Users','pgyvj'))
print(os.path.join(r'c:\Users','pgyvj'))
print(os.path.join(r'c:\Users',r'pgyvj\Users\zz'))
print(os.path.join(r'c:\Users',r'c:\Users\pgyvj\zz'))
print(os.path.getatime(r'C:\Users\Lenovo\PycharmProjects\untitled\5os模块.py'))
print(os.path.getmtime(r'C:\Users\Lenovo\PycharmProjects\untitled'))
C:\Users\Lenovo\PycharmProjects\untitled
C:\Users\Lenovo\PycharmProjects\untitled
C:\Users\Lenovo\PycharmProjects
['Saved Games', 'untitled', '新目录']
os.stat_result(st_mode=16895, st_ino=14073748835635206, st_dev=813721957, st_nlink=1, st_uid=0, st_gid=0, st_size=0, st_atime=1582262140, st_mtime=1582262140, st_ctime=1582262140)
\
;
environ({'NUMBER_OF_PROCESSORS': '12', 'TMP': 'C:\\Users\\Lenovo\\AppData\\Local\\Temp', 'DRIVERDATA': 'C:\\Windows\\System32\\Drivers\\DriverData', 'COMMONPROGRAMW6432': 'C:\\Program Files\\Common Files', 'FPS_BROWSER_USER_PROFILE_STRING': 'Default', 'PROCESSOR_REVISION': '9e0a', 'LOCALAPPDATA': 'C:\\Users\\Lenovo\\AppData\\Local', 'TEMP': 'C:\\Users\\Lenovo\\AppData\\Local\\Temp', 'WINDIR': 'C:\\Windows', 'COMMONPROGRAMFILES(X86)': 'C:\\Program Files (x86)\\Common Files', 'PYTHONIOENCODING': 'UTF-8', 'ONEDRIVE': 'C:\\Users\\Lenovo\\OneDrive', 'SESSIONNAME': 'Console', 'USERDOMAIN_ROAMINGPROFILE': 'LAPTOP-UKKQGU1M', 'USERDOMAIN': 'LAPTOP-UKKQGU1M', 'PATH': 'D:\\Anaconda3\\Library\\bin;D:\\Program Files (x86)\\NetSarang\\Xshell 6\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;D:\\Program Files\\PuTTY\\;d:\\Anaconda3;d:\\Anaconda3\\Scripts;d:\\Anaconda3\\Library\\bin;C:\\Users\\Lenovo\\AppData\\Local\\Microsoft\\WindowsApps;;d:\\Programs\\Microsoft VS Code\\bin', 'APPDATA': 'C:\\Users\\Lenovo\\AppData\\Roaming', 'PROGRAMFILES': 'C:\\Program Files', 'PYTHONPATH': 'C:\\Users\\Lenovo\\PycharmProjects\\untitled', 'OS': 'Windows_NT', 'CONFIGSETROOT': 'C:\\Windows\\ConfigSetRoot', 'FPS_BROWSER_APP_PROFILE_STRING': 'Internet Explorer', 'PYCHARM_HOSTED': '1', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 158 Stepping 10, GenuineIntel', 'ALLUSERSPROFILE': 'C:\\ProgramData', 'PROGRAMW6432': 'C:\\Program Files', 'SYSTEMROOT': 'C:\\Windows', 'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'HOMEDRIVE': 'C:', 'COMSPEC': 'C:\\Windows\\system32\\cmd.exe', 'COMPUTERNAME': 'LAPTOP-UKKQGU1M', 'USERNAME': 'Lenovo', 'SYSTEMDRIVE': 'C:', 'PUBLIC': 'C:\\Users\\Public', 'PROGRAMDATA': 'C:\\ProgramData', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'PROGRAMFILES(X86)': 'C:\\Program Files (x86)', 'PSMODULEPATH': 'C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules', 'PYTHONUNBUFFERED': '1', 'HOMEPATH': '\\Users\\Lenovo', 'LOGONSERVER': '\\\\LAPTOP-UKKQGU1M', 'USERPROFILE': 'C:\\Users\\Lenovo'})
nt
������ C �еľ��� Windows-SSD
�������� 3080-6965
C:\Users\Lenovo\PycharmProjects ��Ŀ¼
2020-02-21 13:15 <DIR> .
2020-02-21 13:15 <DIR> ..
2020-02-18 23:26 <DIR> Saved Games
2020-02-21 13:22 <DIR> untitled
2020-02-21 13:15 <DIR> ��Ŀ¼
0 ���ļ� 0 �ֽ�
5 ��Ŀ¼ 70,057,537,536 �����ֽ�
C:/Users/Lenovo/PycharmProjects/untitled/5os模块.py
C:\Users\Lenovo\PycharmProjects\untitled\5os模块.py
('C:\\Users\\Lenovo\\PycharmProjects\\新目录', '5os模块.py')
C:\Users\Lenovo\PycharmProjects\untitled
5os模块.py
False
True
False
True
Users\pgyvj
c:\Users\pgyvj
c:\Users\pgyvj\Users\zz
c:\Users\pgyvj\zz
1582262528.067196
1582262528.0731132