import os,sys

=======================
sys.modules.keys()
=> print all of using module
=========================
os.getcwd()
=> show current working directory
=========================
os.path.isdir(r'filelocation/filename') or os.path.isfile(r'filelocation')
=> True/False
=========================
os.path.exists(r'filelocation')
=> is filelocation exists
=========================
os.path.getsize(r'filelocation')
=> show filesize
=========================
os.path.split(r'filelocation/filename')
=> show "filelocation","filename"
=========================
os.path.splitext(filelocation/filename)
=> 'filename', '.txt .exe .hwp ...'
=========================
os.chdir(r'fileloation')
=> current directory location change
=========================


'Python' 카테고리의 다른 글

스크린샷 업무 자동화  (0) 2021.07.14
Python: SYS  (0) 2015.07.31
Python:FOR  (0) 2015.07.26

+ Recent posts