-
Notifications
You must be signed in to change notification settings - Fork 0
jasper-zanjani edited this page Aug 6, 2020
·
1 revision
Execute shell command given by string. The value returned is actually the exit code, not the output of the command to STDOUT.
os.system('ls -la')
Store output in a variable
os.popen('ls -la').read()
Navigate filesystem
os.getcwd()
os.chdir(path)
Test for existence of a file
os.path.isfile(file)
- argparse ?
- array ?
- asyncio ?
- bisect ?
- csv ?
- ctypes ?
- curses ?
- datetime ?
- functools ?
- getpass ?
- glob ?
- heapq ?
- http ?
- json ?
- logging ?
- optparse ?
- os ?
- pathlib ?
- platform ?
- pythonnet ?
- random ?
- socket ?
- subprocess ?
- sqlite3 ?
- sys ?
- termcolor ?
- threading ?
- trace ?
- typing ?
- unittest ?
- urllib ?
- venv ?
- weakref ?
- winrm ?