RE:Pythonpath

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • godsgift
    New Member
    • Feb 2008
    • 8

    RE:Pythonpath

    Dear All


    iam using Windows XP,i want to set two path in pythonpath in environment Variable ,now my problem is If iam setting two path in environment variable,my second path is not working ,if i remove First path means,second path is working ,i want to work with two paths,any solution for this problem.


    regards
    Narain
  • dshimer
    Recognized Expert New Member
    • Dec 2006
    • 136

    #2
    Originally posted by godsgift
    Dear All


    iam using Windows XP,i want to set two path in pythonpath in environment Variable ,now my problem is If iam setting two path in environment variable,my second path is not working ,if i remove First path means,second path is working ,i want to work with two paths,any solution for this problem.


    regards
    Narain
    I don't know if it will accomplish the same thing, but I add personal or custom directories to my python path by placing .pth files in the python executable directory.

    Comment

    • godsgift
      New Member
      • Feb 2008
      • 8

      #3
      Originally posted by dshimer
      I don't know if it will accomplish the same thing, but I add personal or custom directories to my python path by placing .pth files in the python executable directory.

      HI,

      Thanks for ur reply,where to add this .pth extension,isit in path extension or
      Pythonpath.



      regards
      Narayana Moorthy.V

      Comment

      • dshimer
        Recognized Expert New Member
        • Dec 2006
        • 136

        #4
        Originally posted by godsgift
        HI,

        Thanks for ur reply,where to add this .pth extension,isit in path extension or
        Pythonpath.



        regards
        Narayana Moorthy.V
        On my system it is just a text file in the same directory as the python.exe file and it contains the names of paths to be searched. For example I have a file called dennis.pth in my c:\python25 directory that looks like

        c:\users\dennis \python
        C:\users\dennis \python\pyinsta ller_1.2
        c:\users\python \common
        c:\vr\python

        Comment

        • godsgift
          New Member
          • Feb 2008
          • 8

          #5
          Sir,


          My actual problem is i want two path in Environment Variable (system variable) like below:


          Python path:
          [INSTALLDIR]Test11\Hardware \HardwareInterf acetest\testt; Second path:[INSTALLDIR]Test12\Hardware test\HardwareIn terfacetest\tes ;

          in above Path second path wont work,if i remove first path means Second path
          Will work,,,any idea to give Common path for both Path iam using Python 23..


          regards
          Narain

          Comment

          • dshimer
            Recognized Expert New Member
            • Dec 2006
            • 136

            #6
            No, sorry, I use the .pth method on all my computers and paths so I'm not sure why your environment isn't working. How does it fail, I mean how does the problem show itself?

            Would it help to add paths from inside the script using sys.path.append ()?

            Forgive me for not answering your actual question but python normally offers many routes to the same destination I just haven't traveled the one you are currently using.

            Originally posted by godsgift
            Sir,


            My actual problem is i want two path in Environment Variable (system variable) like below:


            Python path:
            [INSTALLDIR]Test11\Hardware \HardwareInterf acetest\testt; Second path:[INSTALLDIR]Test12\Hardware test\HardwareIn terfacetest\tes ;

            in above Path second path wont work,if i remove first path means Second path
            Will work,,,any idea to give Common path for both Path iam using Python 23..


            regards
            Narain

            Comment

            Working...