Horje
get current working directory python Code Example
get wd in python
import os

path = os.getcwd()

print(path)
# /Users/mbp/Documents/my-project/python-snippets/notebook

print(type(path))
# <class 'str'>
Source: note.nkmk.me
python get current directory
import os

print(os.getcwd())
working directory python
import os
cwd = os.getcwd()
os get current directory
import os

#Get Current working Directory
currentDirectory = os.getcwd()

#Change the Current working Directory
os.chdir('/home/varun')
get working directory python
import os
os.getcwd()
get current working directory python
# print current working directory in python
import os
cwd = os.getcwd()
print(cwd)




Python

Related
python change base function Code Example python change base function Code Example
keras import optimizer adam Code Example keras import optimizer adam Code Example
pandas remove row if missing value in column Code Example pandas remove row if missing value in column Code Example
sort python dictionary by date Code Example sort python dictionary by date Code Example
python RuntimeWarning: overflow encountered in long_scalars Code Example python RuntimeWarning: overflow encountered in long_scalars Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7