0

I have two python files

file1.py at location /home/nitesh/loc1

import sys
SCRIPT_DIR = Path(sys.path[0])

file2.py at location /home/nitesh/loc2

from file1 import SCRIPT_DIR

I am calling file2.py. Expecting SCRIPT_DIR to /home/nitesh/loc1 but getting /home/nitesh/loc2

How to acheive this

Sumit
  • 1,953
  • 6
  • 32
  • 58

0 Answers0