Re: sys.path[] question

2017-10-29 Thread ElChino
Thomas Jollans wrote: You can find out where a module is loaded from by checking its __file__ attribute. Run python (in interactive mode) and execute import pyreadline pyreadline.__file__ Thanks for that tip. Does that mean that only this .egg is where python imports all pyreadline files f

Re: sys.path[] question

2017-10-29 Thread Thomas Jollans
On 28/10/17 19:24, ElChino wrote: > From the Python2.7 snippet in [1], Python2.7 reports that my > sys.path[] contains: > f:\ProgramFiler\Python27\lib\site-packages\pyreadline-2.0-py2.7-win32.egg > > (a .zip-file) > > But I have also a 'f:\ProgramFiler\Python27\lib\site-packages\pyreadline' > d

Re: sys.path in python3.3

2012-08-27 Thread Nicholas Cole
On Mon, Aug 27, 2012 at 10:05 AM, Ned Deily wrote: > In article <[email protected]>, > Hans Mulder wrote: >> On 26/08/12 20:47:34, Nicholas Cole wrote: >> It has been changed to >> >> ~/Library/Python/$py_version_short/lib/python/site-packages >> >> You can find the p

Re: sys.path in python3.3

2012-08-27 Thread Ned Deily
In article <[email protected]>, Hans Mulder wrote: > On 26/08/12 20:47:34, Nicholas Cole wrote: > It has been changed to > > ~/Library/Python/$py_version_short/lib/python/site-packages > > You can find the path it's looking for in site.USER_SITE That is correct. >

Re: sys.path in python3.3

2012-08-27 Thread Ned Deily
In article , Nicholas Cole wrote: > The only user configuration I've done is to create the following > configuration file: > > NPSC:~ nicholas$ cat .pydistutils.cfg > [install] > install_lib = ~/Library/Python/$py_version_short/site-packages > install_scripts = ~/bin > > I should say, this has

Re: sys.path in python3.3

2012-08-27 Thread Hans Mulder
On 26/08/12 20:47:34, Nicholas Cole wrote: > Dear List, > > In all previous versions of python, I've been able to install packages > into the path: > > ~/Library/Python/$py_version_short/site-packages > > but in the rc builds of python 3.3 this is no longer part of sys.path. It has been changed

Re: sys.path in python3.3

2012-08-27 Thread Nicholas Cole
On Mon, Aug 27, 2012 at 12:18 AM, Ned Deily wrote: > In article > , > Nicholas Cole wrote: >> It certainly does exist. Distutils will happily put packages into it, >> but import won't find them. > > That's odd! It works for me on 10.8 and it worked for me yesterday on > 10.7 which I tested just

Re: sys.path in python3.3

2012-08-26 Thread Ned Deily
In article , Nicholas Cole wrote: > It certainly does exist. Distutils will happily put packages into it, > but import won't find them. That's odd! It works for me on 10.8 and it worked for me yesterday on 10.7 which I tested just after completing the python.org installer builds. Perhaps th

Re: sys.path in python3.3

2012-08-26 Thread Nicholas Cole
On Sun, Aug 26, 2012 at 10:23 PM, Ned Deily wrote: > In article > , > Nicholas Cole wrote: > >> On Sun, Aug 26, 2012 at 8:21 PM, Ned Deily wrote: >> > In article >> > , >> > Nicholas Cole wrote: >> >> In all previous versions of python, I've been able to install packages >> >> into the path:

Re: sys.path in python3.3

2012-08-26 Thread Ned Deily
In article , Nicholas Cole wrote: > On Sun, Aug 26, 2012 at 8:21 PM, Ned Deily wrote: > > In article > > , > > Nicholas Cole wrote: > >> In all previous versions of python, I've been able to install packages > >> into the path: > >> > >> ~/Library/Python/$py_version_short/site-packages > >>

Re: sys.path in python3.3

2012-08-26 Thread Nicholas Cole
On Sun, Aug 26, 2012 at 8:21 PM, Ned Deily wrote: > In article > , > Nicholas Cole wrote: >> In all previous versions of python, I've been able to install packages >> into the path: >> >> ~/Library/Python/$py_version_short/site-packages >> >> but in the rc builds of python 3.3 this is no longer

Re: sys.path in python3.3

2012-08-26 Thread Hans Mulder
On 26/08/12 21:21:15, Ned Deily wrote: > In article > , > Nicholas Cole wrote: >> In all previous versions of python, I've been able to install packages >> into the path: >> >> ~/Library/Python/$py_version_short/site-packages >> >> but in the rc builds of python 3.3 this is no longer part of sys

Re: sys.path in python3.3

2012-08-26 Thread Ned Deily
In article , Nicholas Cole wrote: > In all previous versions of python, I've been able to install packages > into the path: > > ~/Library/Python/$py_version_short/site-packages > > but in the rc builds of python 3.3 this is no longer part of sys.path. > > Before I go hacking the install, is t

Re: Sys.path entries

2009-12-31 Thread Alan Harris-Reid
Gabriel Genellina wrote: En Thu, 31 Dec 2009 04:31:06 -0300, Marco Salden escribió: On Dec 30, 8:13 pm, Alan Harris-Reid wrote: Hi there, In my sys.path (interpreter only, no application loaded), I have the following strange entries... 'C:\\WINDOWS\\system32\\python31.zip'. This file does

Re: Sys.path entries

2009-12-31 Thread Alan Harris-Reid
Marco Salden wrote: On Dec 30, 8:13 pm, Alan Harris-Reid wrote: Hi there, In my sys.path (interpreter only, no application loaded), I have the following strange entries... 'C:\\WINDOWS\\system32\\python31.zip'. This file does not exist anywhere (although python31.dll does exist in \windows

Re: Sys.path entries

2009-12-31 Thread Gabriel Genellina
En Thu, 31 Dec 2009 04:31:06 -0300, Marco Salden escribió: On Dec 30, 8:13 pm, Alan Harris-Reid wrote: Hi there, In my sys.path (interpreter only, no application loaded), I have the following strange entries... 'C:\\WINDOWS\\system32\\python31.zip'. This file does not exist anywhere (alth

Re: Sys.path entries

2009-12-30 Thread Marco Salden
On Dec 30, 8:13 pm, Alan Harris-Reid wrote: > Hi there, > > In my sys.path (interpreter only, no application loaded), I have the > following strange entries... > 'C:\\WINDOWS\\system32\\python31.zip'.  This file does not exist > anywhere (although python31.dll does exist in \windows\system32\), wh

Re: sys.path with multiple Python installations

2009-03-04 Thread Gabriel Genellina
En Thu, 05 Mar 2009 01:48:44 -0200, Xavier Lapointe Desjardins escribió: this is my first post on the mailing list, so I'll try to be clear enough. I've on my computer WinXp x64 with python 2.5 and 2.6 installed. When I tried to run a small script using smtplib using Python 2.6, I got that e

Re: sys.path not properly initialized (was: PyImport_ImportModule/embedding: surprising behaviors)

2007-10-25 Thread Graham Dumpleton
On Oct 26, 6:53 am, David Abrahams <[EMAIL PROTECTED]> wrote: > > David Abrahams wrote: > >> I'm seeing highly surprising (and different!) behaviors of > >> PyImport_ImportModule on Linux and Windows when used in a program with > >> python embedding. > > >> On Linux, ... > > > > Unfortunately, not

Re: sys.path

2007-05-08 Thread John Machin
On May 9, 1:35 am, HMS Surprise <[EMAIL PROTECTED]> wrote: > Is sys.path setup differnently in jython vs python? I have environment > variables pythonpath and jythonpath set to include C:\python22 but the > initial printout indicates it is being ignored. Also when I used > sys.path.extend, the adde

Re: sys.path

2007-05-08 Thread HMS Surprise
On May 8, 10:40 am, Klaus Alexander Seistrup <[EMAIL PROTECTED]> wrote: > HMS Surprise wrote: > > Have I misused .extend? > > The .extend() method expects an iterable, try .append() instead. > > Cheers, > > -- > Klaus Alexander Seistruphttp://klaus.seistrup.dk/ Thanks Klaus. That certainly cleane

Re: sys.path

2007-05-08 Thread Klaus Alexander Seistrup
HMS Surprise wrote: > Have I misused .extend? The .extend() method expects an iterable, try .append() instead. Cheers, -- Klaus Alexander Seistrup http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: sys.path issue in cygwin

2007-01-24 Thread Wang Shuhao
.path become correct. Override the environment variable in Cygwing is also Ok. - Original Message - From: "Jason Tishler" <[EMAIL PROTECTED]> To: "Wang Shuhao" <[EMAIL PROTECTED]> Cc: "Python-List" Sent: Wednesday, January 24, 2007 11:23 PM

Re: sys.path issue in cygwin

2007-01-24 Thread Gabriel Genellina
At Wednesday 24/1/2007 04:58, Wang Shuhao wrote: To keep the question simple, I've set PATH= in cygwin.bat to avoid python initialze sys.path from Windows' PATH environment. The simple answer is that sys.path has nothing to do with the PATH environment variable. sys.path is initialized from t

Re: sys.path issue in cygwin

2007-01-24 Thread Jason Tishler
Wang, Please keep your replies on-list. On Wed, Jan 24, 2007 at 10:28:51PM +0800, Wang Shuhao wrote: > > Why not use the Python that is part of the standard Cygwin > > distribution? > > > Cause the Cygwin version python has the same problem, that why I try > to build python from source. The abo

Re: sys.path issue in cygwin

2007-01-24 Thread Wang Shuhao
ONHOME controls the content of the initial sys.path. put export PYTHONHOME=/usr/local in .bash_profile will fix it. - Original Message - From: "Steve Holden" <[EMAIL PROTECTED]> To: Sent: Wednesday, January 24, 2007 9:42 PM Subject: Re: sys.path issue in cygwin >

Re: sys.path issue in cygwin

2007-01-24 Thread Steve Holden
Wang Shuhao wrote: > > > I successfully built and installed Python 2.2.3 in cygwin. But there is > something wrong in the sys.path. I use following statments for a test. > > >>> import sys > >>> print sys.path > ['', 'C/lib/python2.2/', 'C/lib/python2.2/plat-cygwin', > 'C/lib/python2.2/li

Re: sys.path issue in cygwin

2007-01-24 Thread Jason Tishler
Wang, On Wed, Jan 24, 2007 at 04:14:48PM +0800, Wang Shuhao wrote: > I successfully built and installed Python 2.2.3 in cygwin. > [snip] > Obviously, 'C/lib/python2.2/' is a wrong path. In fact my python is > installed in /usr/local/lib/python2.2.3. The result of the issue is > that when you run a

Re: sys.path and unicode folder names

2006-02-09 Thread Nir Aides
Martin v. Löwis wrote: > Nir Aides wrote: >> If few people use file names not in their respective CP_ACP as you say, >> why did Microsoft bother to make Windows XP a unicode OS? > > Because it simplifies their implementation, in the long run. > >> It is because of this situation that people in no

Re: sys.path and unicode folder names

2006-02-09 Thread Martin v. Löwis
Nir Aides wrote: > If few people use file names not in their respective CP_ACP as you say, > why did Microsoft bother to make Windows XP a unicode OS? Because it simplifies their implementation, in the long run. > It is because of this situation that people in non-English speaking > countries pre

Re: sys.path and unicode folder names

2006-02-09 Thread Nir Aides
If few people use file names not in their respective CP_ACP as you say, why did Microsoft bother to make Windows XP a unicode OS? It does not make any sense. The existence of such bugs is the source of the problem itself. It is because of this situation that people in non-English speaking count

Re: sys.path and unicode folder names

2006-02-08 Thread Martin v. Löwis
Nir Aides wrote: > Actually, I already managed to make a Patch for this problem. > I will post it soon on my website and in this group. > > But I find it strange that this problem even exists, and that I could > not find any workarounds on the Internet. Very few people use file names not in their

Re: sys.path and unicode folder names

2006-02-08 Thread Nir Aides
Actually, I already managed to make a Patch for this problem. I will post it soon on my website and in this group. But I find it strange that this problem even exists, and that I could not find any workarounds on the Internet. Nir Martin v. Löwis wrote: > Nir Aides wrote: >> I can not restrict

Re: sys.path and unicode folder names

2006-02-08 Thread Martin v. Löwis
Nir Aides wrote: > I can not restrict the name to CP_ACP. > I am interested in the general case of Unicode. So you should implement a patch, and contribute this to sf.net/projects/python. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: sys.path and unicode folder names

2006-02-08 Thread Thomas Heller
>> Nir Aides wrote: >>> Is there a solution or a work around for the sys.path problem with >>> unicode folder names on Windows XP? >>> >>> I need to be able to import modules from a folder with a non-ascii name. > Martin v. Löwis wrote: >> If the name is restricted to the CP_ACP code page (i.e.

Re: sys.path and unicode folder names

2006-02-07 Thread Nir Aides
I can not restrict the name to CP_ACP. I am interested in the general case of Unicode. Windows XP is a native Unicode OS. Martin v. Löwis wrote: > Nir Aides wrote: >> Is there a solution or a work around for the sys.path problem with >> unicode folder names on Windows XP? >> >> I need to be able

Re: sys.path and unicode folder names

2006-02-07 Thread Martin v. Löwis
Nir Aides wrote: > Is there a solution or a work around for the sys.path problem with > unicode folder names on Windows XP? > > I need to be able to import modules from a folder with a non-ascii name. If the name is restricted to the CP_ACP code page (i.e. more than ASCII, less then full Unicode)

Re: sys.path - stuff from nowhere?

2005-07-22 Thread Robert Kern
Richard Kessler wrote: > Just build python 2.3.4 (needed for Zope and Plone). Trying to learn more > about use the data in sys.path from importing. When I run Python at the > command prompt, import sys and print sys.path I get stuff that makes no > sense. For example, /usr/local/lib/python23.zip.