Answers for "get the python path"

9

get path to current directory python

import os
os.path.abspath(os.getcwd())
Posted by: Guest on September-16-2020
3

find python path windows

>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)
'C:\\Python25'
Posted by: Guest on December-09-2020
-3

get pyhton file path python

import os

os.path.realpath(__file__)
Posted by: Guest on October-13-2020

Code answers related to "get the python path"

Python Answers by Framework

Browse Popular Code Answers by Language