Thread: Import sys.path

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    7
    Rep Power
    0

    Import sys.path


    Hi

    I have two python files with the same name let say TestFile.py at two different locations say /data/script/ABC/TestFile.py
    and /data/script/XYZ/TestFile.py

    so when i execute my python script which is at this location /data/script/ABC/TestFile.py is picking up the compiled file present at this location /data/script/XYZ/TestFile.py

    Is there any way through which we can picked the compiled pyhton file at the specific location only.

    Please help me out in this

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    138
    Rep Power
    2
    Originally Posted by jainshasha
    Hi

    I have two python files with the same name let say TestFile.py at two different locations say /data/script/ABC/TestFile.py
    and /data/script/XYZ/TestFile.py

    so when i execute my python script which is at this location /data/script/ABC/TestFile.py is picking up the compiled file present at this location /data/script/XYZ/TestFile.py

    Is there any way through which we can picked the compiled pyhton file at the specific location only.

    Please help me out in this

    Thanks
    The order in the pythonpath will determine which of the files to use.

    My suggestion would be to not have duplicate filenames within the same project.

IMN logo majestic logo threadwatch logo seochat tools logo