Re: How do I edit a PythonWin path to import custom built modules???

2006-12-15 Thread Gabriel Genellina
At Friday 15/12/2006 06:46, mohan wrote: To revert back to my question, I wanted to add a new path to my PythonWin IDE to access modules which are in folders other than normal python paths. Here, I need to put my modules in different folders since it is a request of the user. I tried to create

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-15 Thread mohan
BartlebyScrivener wrote: > Gabriel Genellina wrote: > > > > import sys > > print sys.path > > and see what's there. > > Yup. Did that before. That's what I mean. The d:\\python is there and > it doesn't come from the PythonPath in my windows registry. Maybe it > scans for any directory with python

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-14 Thread BartlebyScrivener
Fredrik Lundh wrote: > > have you searched the *entire* registry for the "PythonCore" key? > (python looks under HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER) > I found it in the Scripts key! I was searching on PythonPath before. Sorry. Thank you for the enlightenment. rd -- http://mail.python.org/

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-14 Thread BartlebyScrivener
Fredrik Lundh wrote: > is this an ActiveState build? Yes, I think I mentioned it further up the thread. > what's sys.prefix and sys.exec_prefix set to on your machine, btw? 'C:\\Python24' No big deal. I always just assumed that it found my scripts via the path variable. As long as it finds the

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-14 Thread Fredrik Lundh
BartlebyScrivener wrote: >> what do you get if you do: > >>> python -S >> ... import sys sys.path > > ['', 'C:\\WINDOWS\\system32\\python24.zip', 'd:\\python', > 'C:\\Python24\\DLLs', 'C:\\Python24\\lib', > 'C:\\Python24\\lib\\plat-win', 'C:\\Python24\\lib\\lib-tk', 'C:\ > \Python24']

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread BartlebyScrivener
jay graves wrote: > > Do you have any *.pth files in the C:\Python24 directory? > No. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread BartlebyScrivener
Fredrik Lundh wrote: > what do you get if you do: > > python -S > ... >>> import sys >>> sys.path ['', 'C:\\WINDOWS\\system32\\python24.zip', 'd:\\python', 'C:\\Python24\\DLLs', 'C:\\Python24\\lib', 'C:\\Python24\\lib\\plat-win', 'C:\\Python24\\lib\\lib-tk', 'C:\ \Python24'] > and then >>> imp

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread jay graves
BartlebyScrivener wrote: > Yup. Did that before. That's what I mean. The d:\\python is there and > it doesn't come from the PythonPath in my windows registry. Maybe it > scans for any directory with python in the name? Do you have any *.pth files in the C:\Python24 directory? ... jay -- http:/

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread Fredrik Lundh
BartlebyScrivener wrote: > Yup. Did that before. That's what I mean. The d:\\python is there and > it doesn't come from the PythonPath in my windows registry. what do you get if you do: > python -S ... >>> import sys >>> sys.path and then >>> import site >>> sys.path ? -- http://mai

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread BartlebyScrivener
Gabriel Genellina wrote: > > import sys > print sys.path > and see what's there. Yup. Did that before. That's what I mean. The d:\\python is there and it doesn't come from the PythonPath in my windows registry. Maybe it scans for any directory with python in the name? ['', 'C:\\WINDOWS\\system32

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread Gabriel Genellina
At Wednesday 13/12/2006 10:10, BartlebyScrivener wrote: > Python does *not* use the Path when searching for modules; sys.path is > initialized based on the contents of PYTHONPATH, the location of the > Python executable (or PYTHONHOME), some heuristics, and certain registry > entries. Now I'm s

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread BartlebyScrivener
Fredrik Lundh wrote: > Python does *not* use the Path when searching for modules; sys.path is > initialized based on the contents of PYTHONPATH, the location of the > Python executable (or PYTHONHOME), some heuristics, and certain registry > entries. Now I'm stumped. Unless it's heuristics. The

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-12 Thread Fredrik Lundh
BartlebyScrivener wrote: > Perhaps your way works also, but I have no PythonPath defined in system > variables on Windows XP. > > I keep my Python scripts and modules in d:\Python. I added d:\Python to > the Path variable and I can call and import the scripts and modules > from anywhere I please.

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-12 Thread BartlebyScrivener
Gabriel Genellina wrote: > > There was an error in a previous post, you should create a variable > called PYTHONPATH, not change the system PATH. > Or, group your modules into packages and put them below > lib\site-packages. > Perhaps your way works also, but I have no PythonPath defined in syste

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-12 Thread Gabriel Genellina
mohan ha escrito: > > > I had created my own modules (.py files) in > > > drives and folders other than the python root. > > > I tried your advice, by adding a new path to the "System Variable" > section. It still does not work. I don't understand how could PythonWin There was an error in a previ

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-12 Thread mohan
BartlebyScrivener wrote: > mohan wrote: > > > I had created my own modules (.py files) in > > drives and folders other than the python root. > > Probably easiest if you keep them all in one place. Then add that > "place" to your path by going into Control > Panel|System|Advanced|Environment Variab

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-11 Thread BartlebyScrivener
mohan wrote: > I had created my own modules (.py files) in > drives and folders other than the python root. Probably easiest if you keep them all in one place. Then add that "place" to your path by going into Control Panel|System|Advanced|Environment Variables and adding the path to the path vari

How do I edit a PythonWin path to import custom built modules???

2006-12-11 Thread mohan
Hi Guys, I've been using the following IDE, "Pythonwin - Python IDE and GUI Framework for Windows. Copyright 1994-2001 Mark Hammond " With respect to my work, I had created my own modules (.py files) in drives and folders other than the python root. I know that if I need to import these modules