473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
Feb 14 '08 #1
5 1457
dshimer
136 Expert 100+
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.
Feb 14 '08 #2
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
Feb 15 '08 #3
dshimer
136 Expert 100+
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\pyinstaller_1.2
c:\users\python\common
c:\vr\python
Feb 15 '08 #4
Sir,


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


Python path:
[INSTALLDIR]Test11\Hardware\HardwareInterfacetest\testt; Second path:[INSTALLDIR]Test12\Hardwaretest\HardwareInterfacetest\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
Feb 18 '08 #5
dshimer
136 Expert 100+
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.

Sir,


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


Python path:
[INSTALLDIR]Test11\Hardware\HardwareInterfacetest\testt; Second path:[INSTALLDIR]Test12\Hardwaretest\HardwareInterfacetest\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
Feb 18 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Carlos Moreira | last post by:
I want to install Python third packages in a non-default directory. What´s the better way? - PYTHONPATH variable? - *.pth files in site-packages? I know that the two methos above are...
4
by: Tim Isakson | last post by:
OK - I just checked Programming Python out from the library, and am enjoying seeing the examples (I've dabbled in Python some previously, but an trying to expand my knowledge a bit). I'm having...
4
by: r.e.s. | last post by:
I have no PYTHONPATH nor any other python-related environment variables, yet everything seems fine. (I'm using PythonWin with winxp.) As long as modules are loaded through PythonWin, is...
3
by: Dr. Pastor | last post by:
Several Documents about Python refer to PYTHONPATH. I could not find such variable. (Python 2.4.2, IDLE 1.1.2, Windows XP) How should/could I nominate a Directory to be the local Directory?...
10
by: sushant.sirsikar | last post by:
Hi, I am using Linux env.I set the PYTHONPATH using import sys sys.path.append(----) But we i close python and start again i is not showing my new entry in PYTHONPATH. Can anyone help me to...
9
by: Stef Mientki | last post by:
Is it possible to change the searchpath for modules on the flight, under winXP ? Most preferred is some command to extend the searchpath. (the environment variable PYTHONPATH needs a reboot) ...
2
by: Sergio Correia | last post by:
Hi, I'm trying to add a personal folder to the path used by python in searching for packages and modules. This folder, "C:\docs\utils" , has some packages not yet ready for "site-packages". ...
4
by: mhearne808[insert-at-sign-here]gmail[insert-dot-he | last post by:
I'm missing something major here. I'm trying to add a directory to my python path using the PYTHONPATH environment variable, and it's being ignored by the Python interactive shell. Below is a...
1
by: Aljosa Mohorovic | last post by:
i have a working MySQLdb module (/usr/lib/python2.4/site-packages/ MySQL_python-1.2.2-py2.4-linux-i686.egg), using it without problems. "clean shell" after login: python -c "import MySQLdb"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.