Re: PythonPath / sys.path

2023-05-15 Thread Thomas Passin
On 5/15/2023 3:26 AM, Barry wrote: On 15 May 2023, at 05:39, Thomas Passin wrote: On 5/14/2023 11:08 PM, Chris Angelico wrote: On Mon, 15 May 2023 at 12:07, Thomas Passin wrote: Well, no, why would you assume that? I started to use Linux - in VMs - because I had to make sure that my cros

Re: PythonPath / sys.path

2023-05-15 Thread Chris Angelico
On Mon, 15 May 2023 at 14:38, Thomas Passin wrote: > > On 5/14/2023 11:08 PM, Chris Angelico wrote: > > On Mon, 15 May 2023 at 12:07, Thomas Passin wrote: > >> Well, no, why would you assume that? I started to use Linux - in VMs - > >> because I had to make sure that my cross-platform java/jytho

Re: PythonPath / sys.path

2023-05-15 Thread Barry
> On 15 May 2023, at 05:39, Thomas Passin wrote: > > On 5/14/2023 11:08 PM, Chris Angelico wrote: >>> On Mon, 15 May 2023 at 12:07, Thomas Passin wrote: >>> Well, no, why would you assume that? I started to use Linux - in VMs - >>> because I had to make sure that my cross-platform java/jytho

Re: PythonPath / sys.path

2023-05-14 Thread Thomas Passin
On 5/14/2023 11:08 PM, Chris Angelico wrote: On Mon, 15 May 2023 at 12:07, Thomas Passin wrote: Well, no, why would you assume that? I started to use Linux - in VMs - because I had to make sure that my cross-platform java/jython Tomcat program would work right on Linux. Why, for example, woul

Re: PythonPath / sys.path

2023-05-14 Thread Chris Angelico
On Mon, 15 May 2023 at 12:07, Thomas Passin wrote: > Well, no, why would you assume that? I started to use Linux - in VMs - > because I had to make sure that my cross-platform java/jython Tomcat > program would work right on Linux. Why, for example, would I think to > install Idle from the packa

Re: PythonPath / sys.path

2023-05-14 Thread Thomas Passin
On 5/14/2023 7:28 PM, Chris Angelico wrote: On Mon, 15 May 2023 at 09:22, Thomas Passin wrote: You made a little slam against Windows, but you will find it harder to get things working on Linux. Ubuntu, like many other Linux distros, does not come with pip and Tk (needed for Idle) installed, a

Re: PythonPath / sys.path

2023-05-14 Thread Chris Angelico
On Mon, 15 May 2023 at 09:22, Thomas Passin wrote: > You made a little slam against Windows, but you will find it harder to > get things working on Linux. Ubuntu, like many other Linux distros, > does not come with pip and Tk (needed for Idle) installed, and it's not > so obvious how to install t

Re: PythonPath / sys.path

2023-05-14 Thread Thomas Passin
On 5/14/2023 3:00 PM, Grizzy Adams via Python-list wrote: Sunday, May 14, 2023 at 11:11, Mats Wichmann wrote: Re: PythonPath / sys.path (at least in part) [snip] I have since moved up (a little) so only ~4 years old, I then updated pip from 9.x to 19.1 reason its an old version is it'

Re: PythonPath / sys.path

2023-05-14 Thread Eryk Sun
On 5/13/23, Grizzy Adams via Python-list wrote: > > I have tried adding my dir in registry to the existing PythonPath > > [HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\PythonPath] > @="D:\\Shades\\Tools\\Python\\Lib;D:\\Shades\\Tools\\Python\\DLLs" > > that did

Re: PythonPath / sys.path

2023-05-14 Thread Mats Wichmann
On 5/14/23 13:00, Grizzy Adams via Python-list wrote: Sunday, May 14, 2023 at 11:11, Mats Wichmann wrote: Re: PythonPath / sys.path (at least in part) On 5/14/23 10:43, Barry wrote: I take it you have business reasons to use an obsolete version python. Where did you get your version of

Re: PythonPath / sys.path

2023-05-14 Thread Grizzy Adams via Python-list
Sunday, May 14, 2023 at 11:11, Mats Wichmann wrote: Re: PythonPath / sys.path (at least in part) >On 5/14/23 10:43, Barry wrote: >> I take it you have business reasons to use an obsolete version python. >> Where did you get your version of python from? >In fact, a *nine* y

Re: PythonPath / sys.path

2023-05-14 Thread Mats Wichmann
On 5/14/23 10:43, Barry wrote: I take it you have business reasons to use an obsolete version python. Where did you get your version of python from? In fact, a *nine* year old version of Python that reached end-of-life four years ago. Just sayin' Python version shouldn't have anything to d

Re: PythonPath / sys.path

2023-05-14 Thread Barry
> On 14 May 2023, at 16:32, Grizzy Adams via Python-list > wrote: > > Hi All > > My first post (repeated) > > I am having a problem with PythonPath / sys.path > > I have a dir where I keep all my current work, but I can't seem to add it to > Py

PythonPath / sys.path

2023-05-14 Thread Grizzy Adams via Python-list
Hi All My first post (repeated) I am having a problem with PythonPath / sys.path I have a dir where I keep all my current work, but I can't seem to add it to PythonPath / sys.path When I try to import one of my modules I see >>>import My_Working_File Traceback (most recent call

Re: PYTHONPATH vs Python Virtual Environment

2022-02-04 Thread Dieter Maurer
>different versions of the same package in different projects > >but recently I start using pip install --target for >zipapp<https://docs.python.org/3.10/library/zipapp.html#creating-standalone-applications-with-zipapp> > things, and then I use this pip's option (--targe

PYTHONPATH vs Python Virtual Environment

2022-02-04 Thread Sina Mobasheri
jects but recently I start using pip install --target for zipapp<https://docs.python.org/3.10/library/zipapp.html#creating-standalone-applications-with-zipapp> things, and then I use this pip's option (--target) and add its target folder to PYTHONPATH and target folder's bin direc

Re: Best practices regarding PYTHONPATH

2021-03-10 Thread Thomas Jollans
On 09/03/2021 22:52, Cameron Simpson wrote: On 09Mar2021 05:00, Larry Martell wrote: Which is considered better? Having a long import path or setting PYTHONPATH? For example, in a project where 50% of the imports come from the same top level directory is it better to add that dir to the path

Re: Best practices regarding PYTHONPATH

2021-03-09 Thread Cameron Simpson
On 09Mar2021 05:00, Larry Martell wrote: >Which is considered better? Having a long import path or setting PYTHONPATH? > >For example, in a project where 50% of the imports come from the same top >level directory is it better to add that dir to the path or reference it in >the im

Best practices regarding PYTHONPATH

2021-03-09 Thread Larry Martell
Which is considered better? Having a long import path or setting PYTHONPATH? For example, in a project where 50% of the imports come from the same top level directory is it better to add that dir to the path or reference it in the import statements? -- https://mail.python.org/mailman/listinfo

Proposal: Ignore all empty entries within $PYTHONPATH

2020-08-29 Thread David A. Wheeler
All: I propose that all empty entries with $PYTHONPATH be ignored. This would eliminate some accidents that can lead to security problems. I thought it'd be easiest to explain by drafting a PEP, so please see this first draft below. Thanks! Comments welcome. --- David A. Wh

Re: Setting Pythonpath programmatic

2019-12-16 Thread Barry Scott
used to add all the folders & sub-folders in environment variables under > PYTHONPATH but this has two constrains. > > 1, Any new folders created need to be added in environment variables all the > times. After certain limit, environment variables will not be accepted new > p

Re: Setting Pythonpath programmatic

2019-12-15 Thread dieter
Prasad Rajassekaran writes: > I would want to set python path programmatic in my project. So that, all > other directories files can be imported without any issues. You can extend "sys.path" programmatically to control where Python looks for top level packages/modules (as you apparently have alr

Setting Pythonpath programmatic

2019-12-14 Thread Prasad Rajassekaran
0 Aim:- I would want to set python path programmatic in my project. So that, all other directories files can be imported without any issues. Problem statement:- I used to add all the folders & sub-folders in environment variables under PYTHONPATH but this has two constrains. 1, Any

Re: A question related to the PYTHONPATH

2018-03-26 Thread oyono
Le mardi 27 mars 2018 07:42:57 UTC+2, dieter a écrit : > oyono writes: > > ... > > I was thinking, maybe it could have been done this way to enforce not > > running module files that are supposed to be bundled into packages as > > "independant" python scripts...Therefore, running "python script.

Re: A question related to the PYTHONPATH

2018-03-26 Thread dieter
oyono writes: > ... > I was thinking, maybe it could have been done this way to enforce not running > module files that are supposed to be bundled into packages as "independant" > python scripts...Therefore, running "python script.py" should be reserved to > effectively independant python scrip

Re: A question related to the PYTHONPATH

2018-03-26 Thread oyono
Le lundi 26 mars 2018 08:11:02 UTC+2, dieter a écrit : > adrien oyono writes: > > I have recently read the documentation about how imports work on python, > > and I was wondering why, when you execute a python file, the current > > directory is not added by default to the PY

Re: A question related to the PYTHONPATH

2018-03-26 Thread Ian Kelly
he current >>> directory is not added by default to the PYTHONPATH ? >> >> Maybe, to avoid surprises? >> >> You can invoke a script from different positions in your file system. >> If PYTHONPATH would automatically get ".", the script's behaviour

Re: A question related to the PYTHONPATH

2018-03-26 Thread Dan Stromberg
On Sun, Mar 25, 2018 at 11:10 PM, dieter wrote: > adrien oyono writes: >> I have recently read the documentation about how imports work on python, >> and I was wondering why, when you execute a python file, the current >> directory is not added by default to the PYTHONPATH

Re: A question related to the PYTHONPATH

2018-03-25 Thread dieter
adrien oyono writes: > I have recently read the documentation about how imports work on python, > and I was wondering why, when you execute a python file, the current > directory is not added by default to the PYTHONPATH ? Maybe, to avoid surprises? You can invoke a script from

A question related to the PYTHONPATH

2018-03-25 Thread adrien oyono
Hello everyone, This is my first email to the python list, I'll try my best to do it well. TL;DR I have recently read the documentation about how imports work on python, and I was wondering why, when you execute a python file, the current directory is not added by default to the PYTHO

pythonpath in ipython console

2017-07-12 Thread christoph
hello, I am a bit confused, i use spyder, when i execute in ipython console program start fails with message 'Attribute error' when I start same program via python console everything works fine, even start from terminal workes fine. It seems that i python does not load Pythonpath

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
Op Saturday 23 May 2015 20:13 CEST schreef Mark Lawrence: > On 23/05/2015 18:30, Cecil Westerhof wrote: >> >> I should have checked better. I think I found a bug that made it >> look like PYTHONPATH does not work. >> >> In bash I give: >> echo $PYTHONPATH

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
Op Saturday 23 May 2015 19:30 CEST schreef Cecil Westerhof: > I should have checked better. I think I found a bug that made it > look like PYTHONPATH does not work. > > In bash I give: > echo $PYTHONPATH > this gives: > .:/home/cecil/Python/PythonLibrary > > Then I st

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Mark Lawrence
On 23/05/2015 18:30, Cecil Westerhof wrote: I should have checked better. I think I found a bug that made it look like PYTHONPATH does not work. In bash I give: echo $PYTHONPATH this gives: .:/home/cecil/Python/PythonLibrary Then I start ipython3 and get/do the following

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
gt;>> >>>>> On 22/05/2015 06:20, Cecil Westerhof wrote: >>>>>> I am looking into using ipython instead of bash. But when I >>>>>> call a python program from ipython PYTHONPATH is not set. So >>>>>> pythonscripts that need a m

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Peter Otten
gt; I am looking into using ipython instead of bash. But when I call >>>>> a python program from ipython PYTHONPATH is not set. So >>>>> pythonscripts that need a module through PYTHONPATH will not >>>>> work. >>>>> >>>>> I c

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
Op Saturday 23 May 2015 17:00 CEST schreef Laura Creighton: > In a message of Sat, 23 May 2015 16:08:00 +0200, Cecil Westerhof > writes: >> That is not the problem: >> os.environ['PYTHONPATH'] >> gives: >> .:/home/cecil/Python' >> >> As I

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Laura Creighton
In a message of Sat, 23 May 2015 16:08:00 +0200, Cecil Westerhof writes: >That is not the problem: >os.environ['PYTHONPATH'] >gives: >.:/home/cecil/Python' > >As I interpret it is that the very handy shell variable is not used in ipython. > >-- >

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
when I call >>>> a python program from ipython PYTHONPATH is not set. So >>>> pythonscripts that need a module through PYTHONPATH will not >>>> work. >>>> >>>> I could do something like: >>>> !PYTHONPATH=~/Python/PythonLibrary pyth

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Peter Otten
Cecil Westerhof wrote: > Op Saturday 23 May 2015 11:12 CEST schreef Mark Lawrence: > >> On 22/05/2015 06:20, Cecil Westerhof wrote: >>> I am looking into using ipython instead of bash. But when I call a >>> python program from ipython PYTHONPATH is not set. So

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
Op Saturday 23 May 2015 11:12 CEST schreef Mark Lawrence: > On 22/05/2015 06:20, Cecil Westerhof wrote: >> I am looking into using ipython instead of bash. But when I call a >> python program from ipython PYTHONPATH is not set. So pythonscripts >> that need a module throug

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Mark Lawrence
On 22/05/2015 06:20, Cecil Westerhof wrote: I am looking into using ipython instead of bash. But when I call a python program from ipython PYTHONPATH is not set. So pythonscripts that need a module through PYTHONPATH will not work. I could do something like: !PYTHONPATH=~/Python

PYTHONPATH when calling from ipython

2015-05-21 Thread Cecil Westerhof
I am looking into using ipython instead of bash. But when I call a python program from ipython PYTHONPATH is not set. So pythonscripts that need a module through PYTHONPATH will not work. I could do something like: !PYTHONPATH=~/Python/PythonLibrary python2 … But I find that a little bit

Re: Setting PYTHONPATH does not allow importing module

2015-03-04 Thread cl
fa...@vt.edu wrote: > I have the following directory /home/me/projects/modulename. > > I update PYTHONPATH using the following command: > export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename > > It seems to have been added: > [me@machine ~]$ python -c "

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread Zachary Ware
On Tue, Mar 3, 2015 at 9:47 PM, wrote: > On Tuesday, March 3, 2015 at 10:43:27 PM UTC-5, Zachary Ware wrote: >> Try adding /home/me/projects to PYTHONPATH instead of >> /home/me/projects/modulename. > > Ah, that worked! Yes, I see that the modulename must be visible. Than

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread faruk
On Tuesday, March 3, 2015 at 10:43:27 PM UTC-5, Zachary Ware wrote: > On Tue, Mar 3, 2015 at 9:25 PM, wrote: > > I have the following directory /home/me/projects/modulename. > > > > I update PYTHONPATH using the following command: > > export PYTHONPATH=$PYTHONPATH:/

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread faruk
he following directory /home/me/projects/modulename. > > > > I update PYTHONPATH using the following command: > > export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename > > > > It seems to have been added: > > [me@machine ~]$ python -c "import sys; print(sy

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread faruk
he following directory /home/me/projects/modulename. > > > > I update PYTHONPATH using the following command: > > export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename > > > > It seems to have been added: > > [me@machine ~]$ python -c "import sys; print(sy

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread Zachary Ware
On Tue, Mar 3, 2015 at 9:25 PM, wrote: > I have the following directory /home/me/projects/modulename. > > I update PYTHONPATH using the following command: > export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename > > It seems to have been added: > [me@machine ~]$ python

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread liuerfire Wang
Is there a file named __init__.py in the modulename dir? Best regards On Wed, Mar 4, 2015 at 11:25 AM, wrote: > I have the following directory /home/me/projects/modulename. > > I update PYTHONPATH using the following command: > export PYTHONPATH=$PYTHONPATH:/home/me/projects/modul

Setting PYTHONPATH does not allow importing module

2015-03-03 Thread faruk
I have the following directory /home/me/projects/modulename. I update PYTHONPATH using the following command: export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename It seems to have been added: [me@machine ~]$ python -c "import sys; print(sys.path)" ['',... '/hom

Re: new.py and having '.' in PYTHONPATH

2015-02-23 Thread Ian Kelly
On Mon, Feb 23, 2015 at 3:14 PM, Ethan Furman wrote: > On 02/23/2015 01:00 PM, Tobiah wrote: > >> Anyway, it raises the question as to whether having '.' in the >> PYTHONPATH is at all a sane thing to do. > > The current directory is added to sys.path /only/

Re: PYTHONPATH and module names

2013-07-02 Thread SpaghettiToastBook .
Relative imports only work with the "from ... import ..." form. — SpaghettiToastBook On Mon, Jul 1, 2013 at 3:54 PM, Tobiah wrote: >> Are you familiar with absolute and relative imports: >> http://docs.python.org/release/2.5/whatsnew/pep-328.html > > > Doesn't seem to work: > > Python 2.7.3 (de

Re: PYTHONPATH and module names

2013-07-01 Thread Lele Gaifax
Steven D'Aprano writes: > On Mon, 01 Jul 2013 14:38:50 -0700, rusi wrote: >> 2. The __future__ is not necessary in python 2.7 [Not necessary or not >> allowed I not know :-) ] > > Not necessary. IIRC that it is needed, to solve the OP problem: one thing is the syntax, which under Python 2.7 is e

Re: PYTHONPATH and module names

2013-07-01 Thread Fábio Santos
On 1 Jul 2013 20:58, "Tobiah" wrote: >> >> Are you familiar with absolute and relative imports: >> http://docs.python.org/release/2.5/whatsnew/pep-328.html > > > Doesn't seem to work: > > Python 2.7.3 (default, May 10 2012, 13:31:18) > [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 > Type "help", "

Re: PYTHONPATH and module names

2013-07-01 Thread Steven D'Aprano
On Mon, 01 Jul 2013 14:38:50 -0700, rusi wrote: > On Tuesday, July 2, 2013 1:24:30 AM UTC+5:30, Tobiah wrote: >> > Are you familiar with absolute and relative imports: >> > http://docs.python.org/release/2.5/whatsnew/pep-328.html >> >> Doesn't seem to work: >> Python 2.7.3 (default, May 10 2012,

Re: PYTHONPATH and module names

2013-07-01 Thread rusi
On Tuesday, July 2, 2013 1:24:30 AM UTC+5:30, Tobiah wrote: > > Are you familiar with absolute and relative imports: > > http://docs.python.org/release/2.5/whatsnew/pep-328.html > > Doesn't seem to work: > Python 2.7.3 (default, May 10 2012, 13:31:18) > [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux

Re: PYTHONPATH and module names

2013-07-01 Thread Tobiah
Are you familiar with absolute and relative imports: http://docs.python.org/release/2.5/whatsnew/pep-328.html Doesn't seem to work: Python 2.7.3 (default, May 10 2012, 13:31:18) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

Re: PYTHONPATH and module names

2013-07-01 Thread rusi
On Monday, July 1, 2013 11:59:35 PM UTC+5:30, Tobiah wrote: > So today, I created a file called 'formatter.py', > and my program broke. It turned out that I was > also import 'gluon' from web2py, which in turn, > somewhere, imported the regular python formatter.py > with which I was not familiar.

PYTHONPATH and module names

2013-07-01 Thread Tobiah
So today, I created a file called 'formatter.py', and my program broke. It turned out that I was also import 'gluon' from web2py, which in turn, somewhere, imported the regular python formatter.py with which I was not familiar. So the question is: Does one simply always have to be knowledgeable

Re: PYTHONPATH: dev and prod

2013-06-13 Thread jacopo
On Wednesday, June 12, 2013 5:10:05 PM UTC+1, rusi wrote: > On Jun 12, 6:29 pm, jacopo wrote: > > > > 1. How you run -- 'launch' -- the code -- from py and from prod > > > > > > when I have to test I use "python any_script.py"  but in production there > > is a c++ program that is able to wrap

Re: PYTHONPATH: dev and prod

2013-06-12 Thread rusi
On Jun 12, 6:29 pm, jacopo wrote: > > 1. How you run -- 'launch' -- the code -- from py and from prod > > when I have to test I use "python any_script.py"  but in production there is > a c++ program that is able to wrap and run python code (the technical details > are a bit beyond my knowledge)

Re: PYTHONPATH: dev and prod

2013-06-12 Thread jacopo
> 1. How you run -- 'launch' -- the code -- from py and from prod when I have to test I use "python any_script.py" but in production there is a c++ program that is able to wrap and run python code (the technical details are a bit beyond my knowledge) > 2. What error you get when I run as "pyt

Re: PYTHONPATH: dev and prod

2013-06-12 Thread rusi
trol on how the > module is launched. You need to give more data: 1. How you run -- 'launch' -- the code -- from py and from prod 2. What error you get 3. Did you try bundling your modules into a package? What problem happened? If PYTHONPATH does not work for you you can look at pat

Re: PYTHONPATH: dev and prod

2013-06-12 Thread jacopo
, 2013 6:14:43 PM UTC+1, rusi wrote: > On Jun 11, 9:28 pm, jacopo wrote: > > > I am developing my code in the path: > > > /py/myscripts > > > /py/mylib > > > In order to "import mylib", I need to add /py/mylib to PYTHONPATH. > > > >

Re: PYTHONPATH: dev and prod

2013-06-12 Thread jacopo
:14:43 PM UTC+1, rusi wrote: > On Jun 11, 9:28 pm, jacopo wrote: > > > I am developing my code in the path: > > > /py/myscripts > > > /py/mylib > > > In order to "import mylib", I need to add /py/mylib to PYTHONPATH. > > > >

Re: PYTHONPATH: dev and prod

2013-06-11 Thread rusi
On Jun 11, 9:28 pm, jacopo wrote: > I am developing my code in the path: > /py/myscripts > /py/mylib > In order to "import mylib", I need to add /py/mylib to PYTHONPATH. > > Now I want to save a snapshot of the current code in the production > directory, I will

PYTHONPATH: dev and prod

2013-06-11 Thread jacopo
I am developing my code in the path: /py/myscripts /py/mylib In order to "import mylib", I need to add /py/mylib to PYTHONPATH. Now I want to save a snapshot of the current code in the production directory, I will copy all in: /prod/myscripts /prod/mylib The problem now is that when

Re: set PYTHONPATH for a directory?

2012-05-04 Thread Pedro Larroy
ibrary in directory L.  Then I have in an >> unrelated directory, the test software, which I need to use the library >> version >> from directory L. >> >> One approach is to set PYTHONPATH whenever I run this test software.  Any >> suggestion on a more foolproo

Re: set PYTHONPATH for a directory?

2012-05-04 Thread Dave Angel
> version > from directory L. > > One approach is to set PYTHONPATH whenever I run this test software. Any > suggestion on a more foolproof approach? > Simply modify sys.path at the beginning of your test software. That's where import searches. -- DaveA -- http://mail.python.org/mailman/listinfo/python-list

set PYTHONPATH for a directory?

2012-05-04 Thread Neal Becker
I'm testing some software I'm building against an alternative version of a library. So I have an alternative library in directory L. Then I have in an unrelated directory, the test software, which I need to use the library version from directory L. One approach is to set PYTHONPAT

Re: Alternatives to PythonPath

2011-05-31 Thread Gabriel Genellina
En Sun, 29 May 2011 18:49:28 -0300, ray escribió: I am using Win7 on a tightly locked down desktop. Is there an alternative to using PythonPath? What are the trade-offs? Usually there is no need to define the PYTHONPATH variable; I never use it. There is a per-user site-packages directory

Re: Alternatives to PythonPath

2011-05-29 Thread rusi
On May 30, 2:49 am, ray wrote: > I am using Win7 on a tightly locked down desktop. > > Is there an alternative to using PythonPath? > > What are the trade-offs? > > Thanks, > ray Externally: 1. PYTHONPATH 2. .pth files http://bob.pythonmac.org/archives/2005/02/06/us

Re: Alternatives to PythonPath

2011-05-29 Thread Irmen de Jong
On 29-5-2011 23:49, ray wrote: > I am using Win7 on a tightly locked down desktop. > > Is there an alternative to using PythonPath? > What do you mean by "using PythonPath"? What doesn't work that you want to have an alternative for? Irmen -- http://mail.python.

Alternatives to PythonPath

2011-05-29 Thread ray
I am using Win7 on a tightly locked down desktop. Is there an alternative to using PythonPath? What are the trade-offs? Thanks, ray -- http://mail.python.org/mailman/listinfo/python-list

Python3 "designed right" (was: PYTHONPATH)

2011-04-18 Thread Brendan Simon (eTRIX)
On 19/04/2011 2:15 AM, python-list-requ...@python.org wrote: Subject: Re: PYTHONPATH From: MRAB Date: Mon, 18 Apr 2011 16:31:31 +0100 To: python-list@python.org On 18/04/2011 05:37, harrismh777 wrote: [snip] In retrospect, in many ways this is why I am relatively patient with the Python3

Re: PYTHONPATH

2011-04-18 Thread MRAB
On 18/04/2011 05:37, harrismh777 wrote: [snip] In retrospect, in many ways this is why I am relatively patient with the Python3 development direction. While I think its non-compatibility may hurt in the short term, the long term goal of stream-lining the language will make for a much better Pytho

Re: PYTHONPATH

2011-04-17 Thread harrismh777
Steven D'Aprano wrote: In my opinion, a better explanation for the difficulty faced by Windows users is that this is a side-effect of Windows starting life as a single-user operating system. Yes, that is my opinion as well. Windows for better or worse is plagued by "cruft" that dates back to t

Re: PYTHONPATH

2011-04-17 Thread Steven D'Aprano
On Sun, 17 Apr 2011 01:14:54 -0500, harrismh777 wrote: > Its just technically difficult to > setup easily configured concurrent environments on the Windows platform, > primarily due to the way the platform was designed--- closed and > proprietary--- with little to no community input. I believe th

Re: PYTHONPATH

2011-04-16 Thread harrismh777
jmfauth wrote: I belong to those who are very happy with the Python installations on Windows platform . . . I do not see any mess here. Sorry, I was speaking of a technical mess, not a user's mess. What I was alluding to specifically is explained very well in PEP 394. The technical reasoning

Re: PYTHONPATH

2011-04-16 Thread Algis Kabaila
other Python versions or > porting that application (*) to another Python version. And > that on all Windows versions (Win2K, XP, Vista, Win7) modulo > the underlaying os-libs compatibility, but that's the same > problem on all os, especially for the GUI libs. > > I'm usi

Re: PYTHONPATH

2011-04-16 Thread jmfauth
-libs compatibility, but that's the same problem on all os, especially for the GUI libs. I'm using Python since ver 1.5.6 and I never set any PYTHONPATH environment variable. A final word about sys.path. This is is my mind the most clever idea of Python. I have the feeling, no offense

Re: PYTHONPATH

2011-04-16 Thread Algis Kabaila
On Saturday 16 April 2011 14:16:59 harrismh777 wrote: > Algis Kabaila wrote: > > Is PYTHONPATH a system variable that sets the > > path for several sessions and if so, where in the system is > > it? Do I need to create one for setting python path for > > several session

Re: PYTHONPATH

2011-04-15 Thread harrismh777
Algis Kabaila wrote: Is PYTHONPATH a system variable that sets the path for several sessions and if so, where in the system is it? Do I need to create one for setting python path for several sessions? It can be, and there are lots of ways to accomplish what you want, some of which depends on

Re: PYTHONPATH

2011-04-15 Thread Algis Kabaila
o add directories to > the module search path: > http://docs.python.org/library/site.html > > Cheers, > Chris From Gabriel Genellina: > > escribió: > > An elementary question that is bugging me, regarding > > PYTHONPATH is an environment variable, you set i

Re: PYTHONPATH

2011-04-15 Thread Gabriel Genellina
En Fri, 15 Apr 2011 05:33:18 -0300, Algis Kabaila escribió: An elementary question that is bugging me, regarding sys.path values.sys.path can be altered easily, but the changes last for the current session only. I would like the changes to stay for several sessions. Is PYTHONPATH a system

Re: PYTHONPATH

2011-04-15 Thread Chris Rebert
On Fri, Apr 15, 2011 at 1:33 AM, Algis Kabaila wrote: > Hi, > > An elementary question that is bugging me, regarding sys.path > values.sys.path can be altered easily, but the changes last for > the current session only. I would like the changes to stay for > several sessions

PYTHONPATH

2011-04-15 Thread Algis Kabaila
Hi, An elementary question that is bugging me, regarding sys.path values.sys.path can be altered easily, but the changes last for the current session only. I would like the changes to stay for several sessions. Is PYTHONPATH a system variable that sets the path for several sessions and if so

Re: newbie question about PYTHONPATH

2011-02-19 Thread Westley Martínez
On Sat, 2011-02-19 at 19:22 +0100, Andrea Crotti wrote: > Il giorno 19/feb/2011, alle ore 18.25, Doug Epling ha scritto: > > > The best way I have found is to place that definition of your PYTHONPATH in > > your .bash_profile in your home directory and ex

Re: newbie question about PYTHONPATH

2011-02-19 Thread Andrea Crotti
Il giorno 19/feb/2011, alle ore 18.25, Doug Epling ha scritto: > The best way I have found is to place that definition of your PYTHONPATH in > your .bash_profile in your home directory and export it from there. > > PYTHONPATH=/home/foo/prog/learning_python > >

Re: newbie question about PYTHONPATH

2011-02-19 Thread Doug Epling
The best way I have found is to place that definition of your PYTHONPATH in your .bash_profile in your home directory and export it from there. PYTHONPATH=/home/foo/prog/learning_python export PYTHONPATH This way your PYTHONPATH is picked up each time you log on. You might

Re: newbie question about PYTHONPATH

2011-02-15 Thread Alexander Kapps
On 15.02.2011 19:12, Panupat Chongstitwattana wrote: Panupat, please don't top-post, it messes the the natural order of the discussion. Thanks. I think the command line should look something along this line export PYTHONPATH=$HOME/foo/prog/learning_python/: with a colon at the end.

Re: newbie question about PYTHONPATH

2011-02-15 Thread Panupat Chongstitwattana
I think the command line should look something along this line export PYTHONPATH=$HOME/foo/prog/learning_python/: with a colon at the end. On Wed, Feb 16, 2011 at 12:49 AM, Tim Hanson wrote: > I am to the point in _Learning_Python_  where functions are introduced. > > I decided to e

newbie question about PYTHONPATH

2011-02-15 Thread Tim Hanson
I am to the point in _Learning_Python_ where functions are introduced. I decided to experiment by putting a function into a file and importing it into Idle. Of course, Idle couldn't find it, so I executed the following command in Bash: PYTHONPATH=/home/foo/prog/learning_python e

Re: Startup problems with Python 3.1.2 and PythonPath under XP

2010-04-12 Thread Martin v. Loewis
by why Python 3.1 acts up when I set the environment variable > PYTHONPATH. It certainly caused no problem with the 2.X series. Most likely, H:\Python contains a module with a name that conflicts with the standard library. Starting IDLE tries to import that module - but not from the standard librar

Re: Startup problems with Python 3.1.2 and PythonPath under XP

2010-04-12 Thread tkp...@hotmail.com
iable PYTHONPATH. It certainly caused no problem with the 2.X series. -- http://mail.python.org/mailman/listinfo/python-list

Startup problems with Python 3.1.2 and PythonPath under XP

2010-04-12 Thread tkp...@hotmail.com
I run Python under Windows XP SP3, and for the longest time, I have installed it on my C: drive under C:\PythonXX (XX = 20, 21., 26), and maintained all my Python files on our network in a directory called H:\Python that I point to by creating an environment variable called PYTHONPATH. I

Re: Recall: How to add a library path to pythonpath ?

2010-03-18 Thread Chris Rebert
On Tue, Mar 16, 2010 at 4:56 AM, Barak, Ron wrote: > Barak, Ron would like to recall the message, "How to add a library path to > pythonpath ?". Good luck with that. :) - Chris -- http://mail.python.org/mailman/listinfo/python-list

Recall: How to add a library path to pythonpath ?

2010-03-18 Thread Barak, Ron
Barak, Ron would like to recall the message, "How to add a library path to pythonpath ?". -- http://mail.python.org/mailman/listinfo/python-list

RE: How to add a library path to pythonpath ?

2010-03-17 Thread Barak, Ron
> -Original Message- > From: Mark Hammond [mailto:skippy.hamm...@gmail.com] > Sent: Wednesday, March 17, 2010 2:08 AM > To: Barak, Ron > Cc: Pablo Recio Quijano; python-list@python.org > Subject: Re: How to add a library path to pythonpath ? > > On 17/03/2010 1

  1   2   3   >