Answers for "how to define directory path as a string in python"

1

python file location path

import os

print('getcwd:      ', os.getcwd())
print('__file__:    ', __file__)
Posted by: Guest on August-23-2020
0

add dir to path python

import sys
sys.path.insert(0,'/path/to/mod_directory')
Posted by: Guest on August-26-2021

Code answers related to "how to define directory path as a string in python"

Python Answers by Framework

Browse Popular Code Answers by Language