Answers for "python.pythonPath"

1

save pythonpath

export PYTHONPATH="${PYTHONPATH}:/my/other/path"
Posted by: Guest on June-26-2020
0

show pythonpath

# option a
import os
print(os.environ['PYTHONPATH'].split(os.pathsep))

# option b
import sys
print(sys.path)
Posted by: Guest on September-08-2021
0

how to get the realpath with python

import os
print("real path of file ",filename," is ",str(os.path.realpath(filename)))
Posted by: Guest on October-05-2021
0

path in python

data_folder = "source_data/text_files/"

file_to_open = data_folder + "raw_data.txt"

f = open(file_to_open)

print(f.read())
Posted by: Guest on March-27-2021

Code answers related to "python.pythonPath"

Python Answers by Framework

Browse Popular Code Answers by Language