Answers for "pathlib pwd"

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
2

pathlib path get directory of current file

import pathlib
pathlib.Path(__file__).parent.absolute()
Posted by: Guest on April-04-2020

Python Answers by Framework

Browse Popular Code Answers by Language