ottieni wd in python
import os
path = os.getcwd()
print(path)
# /Users/mbp/Documents/my-project/python-snippets/notebook
print(type(path))
# <class 'str'>
directory di lavoro python
import os
cwd = os.getcwd()
python ottiene la directory corrente
import os
print(os.getcwd())
ottieni diroctary in python
import os
cwd = os.getcwd()
print(cwd)
ottieni il percorso della directory corrente python
import os
os.path.abspath(os.getcwd())
ottieni la directory corrente python
import os
current_working_directory = os.getcwd()
print(current_working_directory) # should print the cwd
""" Bonus: If you want to change cwd, without moving file,
use the following method"""
os.chdir("path/to/directory")