Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Get working directory in Python

import os
 
print("File location using os.getcwd():", os.getcwd())
 
print(f"File location using __file__ variable: {os.path.realpath(os.path.dirname(__file__))}")
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Get #working #directory #Python
ADD COMMENT
Topic
Name
9+1 =