Comes with the anaconda install.
import os
We can get the operating system we're working on
1. **nt** is windows
2. **posix** is all unix based systems (Mac, Linux, ect)
Thrid would be java but not very common
print(os.name)
posix
NOTE if working on windows need to store strings as \ for escape.
os.getcwd()
'/Users/charlesangione/git/machinelearningai'
print(os.getcwd())
/Users/charlesangione/git/machinelearningai
os.listdir('.')
['.DS_Store', 'Object Orient Programming Theory.ipynb', 'df.xlsx', 'datasets', 'Flow Control.ipynb', 's1000DAnalysis.ipynb', 'intro2JupyterNotebooks.ipynb', 'OS Module.ipynb', '.gitignore', 'NumPy.ipynb', '.ipynb_checkpoints', 'User Defined Functions.ipynb', '.git', 'Pandas.ipynb', 'dfElements.xlsx', 'Regular Expressions.ipynb']
#os.listdir('/users/username/git')
#os.mkdir()
#os.rename
#Note OS directory not needed. Can be done in base python.
#file = open('somefile','w')
#file.write('hello\n')
#file.writ4e('world!')
#file.close()