On Feb 16, 2017, at 9:55 PM, Rustom Mody wrote:
> On Friday, February 17, 2017 at 3:24:32 AM UTC+5:30, Terry Reedy wrote:
>> On 2/15/2017 7:42 AM, poseidon wrote:
>>
>>> what are pth files for?
>>
>> They are for extending (mainly) lib/site-packages.
>
>
> Hey Terry!
> This needs to get in
On Friday, February 17, 2017 at 3:24:32 AM UTC+5:30, Terry Reedy wrote:
> On 2/15/2017 7:42 AM, poseidon wrote:
>
> > what are pth files for?
>
> They are for extending (mainly) lib/site-packages.
Hey Terry!
This needs to get into more public docs than a one-off post on a newsgroup/ML
--
htt
On 2/15/2017 7:42 AM, poseidon wrote:
what are pth files for?
They are for extending (mainly) lib/site-packages. To repeat what I
have posted before: every time I install a new version of Python, I add
(copy) python.pth containing 'F:/python' (without the quotes). This
makes my directory
On Wednesday, February 15, 2017 at 8:34:45 AM UTC-5, Wolfgang Maier wrote:
> On 15.02.2017 13:42, poseidon wrote:
> > On 15/02/17 12:16, Wolfgang Maier wrote:
> >> On 15.02.2017 10:33, poseidon wrote:
> >>> In /usr/lib/python3.6/site-packages I wrote a file tau4.pth. It contains
> >>> the line
> >>
Le mercredi 15 février 2017 10:34:42 UTC-5, Steve D'Aprano a écrit :
> On Wed, 15 Feb 2017 11:42 pm, poseidon wrote:
>
> > Yes, removed it (symlink still there) and it still works. But then, what
> > are pth files for?
>
>
> Good question. I don't actually know anyone that uses pth files, so pe
On Wed, 15 Feb 2017 11:42 pm, poseidon wrote:
> Yes, removed it (symlink still there) and it still works. But then, what
> are pth files for?
Good question. I don't actually know anyone that uses pth files, so perhaps
they're unnecessary.
But the principle behind them is that they can be used
On 15/02/17 14:34, Wolfgang Maier wrote:
On 15.02.2017 13:42, poseidon wrote:
On 15/02/17 12:16, Wolfgang Maier wrote:
On 15.02.2017 10:33, poseidon wrote:
In /usr/lib/python3.6/site-packages I wrote a file tau4.pth. It
contains
the line
/home/poseidon/tau4/swr/py3/src
In /home/poseidon/tau4
On 15.02.2017 13:42, poseidon wrote:
On 15/02/17 12:16, Wolfgang Maier wrote:
On 15.02.2017 10:33, poseidon wrote:
In /usr/lib/python3.6/site-packages I wrote a file tau4.pth. It contains
the line
/home/poseidon/tau4/swr/py3/src
In /home/poseidon/tau4/swr/py3/src there's an __init__.py file,
On 15/02/17 12:16, Wolfgang Maier wrote:
On 15.02.2017 10:33, poseidon wrote:
In /usr/lib/python3.6/site-packages I wrote a file tau4.pth. It contains
the line
/home/poseidon/tau4/swr/py3/src
In /home/poseidon/tau4/swr/py3/src there's an __init__.py file, so it
should be possible to write
imp
On 15.02.2017 10:33, poseidon wrote:
In /usr/lib/python3.6/site-packages I wrote a file tau4.pth. It contains
the line
/home/poseidon/tau4/swr/py3/src
In /home/poseidon/tau4/swr/py3/src there's an __init__.py file, so it
should be possible to write
import tau4
in my programs.
No, that's no
En Tue, 09 Jun 2009 20:30:06 -0300, rh0dium
escribió:
On Jun 9, 3:28 pm, Emile van Sebille wrote:
On 6/9/2009 3:00 PM rh0dium said...
> I have a .pth file which has some logic in it - but it isn't quite
> enough...
> It started with this..
> import os, site; site.addsitedir(os.path.join(os.e
On Tue, 9 Jun 2009 21:33:56 -0700 (PDT), rh0dium
wrote:
>> Having multiple paths or multiple .PTH files isn't a
>> problem for python.
> ..
> We use it for our dev tree before we roll to production. Once dev is
> QA'd then we (integrate) those changes to main and release.
Makes sense...
:-)
On Jun 9, 4:58 pm, David Lyon wrote:
> On Tue, 9 Jun 2009 16:30:06 -0700 (PDT), rh0dium
> wrote:
>
> >> > Apparently there is a problem with the if statement???
>
> >> > Thanks
>
> > No for .pth files this needs to be on a single line..
>
> I can't really see why you need conditional code...
>
>
On Jun 9, 9:19 pm, alex23 wrote:
> On Jun 10, 8:00 am, rh0dium wrote:
>
> > Apparently there is a problem with the if statement???
>
> Try restructuring the if as a ternary condition:
>
> import os, site; smsc = os.environ.get("TECHROOT", "/home/tech"); smsc
> = smsc if os.path.isdir(smsc) else "
On Jun 10, 8:00 am, rh0dium wrote:
> Apparently there is a problem with the if statement???
Try restructuring the if as a ternary condition:
import os, site; smsc = os.environ.get("TECHROOT", "/home/tech"); smsc
= smsc if os.path.isdir(smsc) else "/home/tech"; site.addsitedir
(os.path.join(smsc,
On Tue, 9 Jun 2009 16:30:06 -0700 (PDT), rh0dium
wrote:
>> > Apparently there is a problem with the if statement???
>>
>> > Thanks
>
> No for .pth files this needs to be on a single line..
I can't really see why you need conditional code...
If you want to add more locations...
Simply create a
On Jun 9, 3:28 pm, Emile van Sebille wrote:
> On 6/9/2009 3:00 PM rh0dium said...
>
>
>
>
>
> > I have a .pth file which has some logic in it - but it isn't quite
> > enough...
>
> > It started with this..
> > import os, site; site.addsitedir(os.path.join(os.environ["TECHROOT"],
> > "tools/python/
On 6/9/2009 3:00 PM rh0dium said...
I have a .pth file which has some logic in it - but it isn't quite
enough...
It started with this..
import os, site; site.addsitedir(os.path.join(os.environ["TECHROOT"],
"tools/python/modules"))
But that eventually evolved into..
import os, site; site.addsite
Benjamin Rutt wrote:
> Am I correct in understanding that:
>
> 1) foo.pth will be used if it is in the directory
> /usr/lib/python-2.4/site-packages
>
> 2) foo.pth will not be read from if it is only placed somewhere in the
> PYTHONPATH environment, such as foo.pth exists as the file
> /tmp/bar/f
Benjamin Rutt wrote:
> Am I correct in understanding that:
>
> 1) foo.pth will be used if it is in the directory
> /usr/lib/python-2.4/site-packages
>
> 2) foo.pth will not be read from if it is only placed somewhere in the
> PYTHONPATH environment, such as foo.pth exists as the file
> /tmp/bar/f
Peter Hansen schrieb:
> Peter Maas wrote:
>> But sitecustomize.py changes the Python installation, doesn't it?
>> This wouldn't be an advantage over putting a .pth file into
>> .../site-packages.
>
>
> You can have a local sitecustomize.py in the current directory, which
> wouldn't change the Py
Michael Ekstrand schrieb:
> If top/ is the working directory for your Python interpreter, the
> problem is solved automatically. Python puts the current working
> directory in the default search path. So, if you run
IIS sets the the site path as working directory. So I would probably
have to chang
Peter Maas wrote:
> Peter Hansen schrieb:
>> generally such non-standard sys.path and .pth manipulations are best
>> handled by a sitecustomize.py file, possibly which makes its own calls
>> to site.addsitedir() and such. Try "help(site)" for more.
>
> But sitecustomize.py changes the Python in
On Wed, 31 Aug 2005 15:07:41 +0200
Peter Maas <[EMAIL PROTECTED]> wrote:
> I want a tree
>
> top/
> install.py
> sub1/
> __init__.py
> mod1.py
> sub2/
> mod2.py
>
> where I can do "from sub1 import mod1" in mod2.py no matter what the
> absolute path of to
Peter Hansen schrieb:
> Not sure from the above description exactly what it is you want,
I want a tree
top/
install.py
sub1/
__init__.py
mod1.py
sub2/
mod2.py
where I can do "from sub1 import mod1" in mod2.py no matter what the
absolute path of top is. T
Peter Maas wrote:
> My goal is to have the top level of a directory tree in the Python
> path without touching anything outside the directory. I tried to
> create .pth files with the top level path in every subdirectory
> but this doesn't work despite working directory being part of the
> Python pa
Neil Benn wrote:
>* Site.py is prompted to load a sitecustomise.py file which is
> located in the Lib directory - if it is there. This file is
> automatically executed on the start up of python. Here you can
> look for a command line argument (or a local config file) passed
>
Sylvain Thenault wrote:
>On Tue, 09 Aug 2005 09:37:47 +, Adriano Varoli Piazza wrote:
>
>
>
>>Sylvain Thenault ha scritto:
>>
>>
>>>Hi there !
>>>
>>>I've some questions regarding pth files (which btw are undocumented in
>>>the python reference, is this intentional ?)
>>>
>>>I thought th
Richie Hindle wrote:
> http://google.com/search?q=site:docs.python.org%20pth
>
> The first hit explains how .pth files work (although it's the sort of
> documentation that makes Xah Lee explode with fury).
That just makes it all the more delicious.
--
Erik Max Francis && [EMAIL PROTECTED] && h
[Sylvain]
> I've some questions regarding pth files (which btw are undocumented in the
> python reference, is this intentional ?)
http://google.com/search?q=site:docs.python.org%20pth
The first hit explains how .pth files work (although it's the sort of
documentation that makes Xah Lee explode w
On Tue, 09 Aug 2005 09:37:47 +, Adriano Varoli Piazza wrote:
> Sylvain Thenault ha scritto:
>> Hi there !
>>
>> I've some questions regarding pth files (which btw are undocumented in
>> the python reference, is this intentional ?)
>>
>> I thought that I could use a .pth file to be able to im
Sylvain Thenault ha scritto:
> Hi there !
>
> I've some questions regarding pth files (which btw are undocumented in the
> python reference, is this intentional ?)
>
> I thought that I could use a .pth file to be able to import zope products
> from both INSTANCE_HOME/Products and ZOPE_HOME/lib/py
>> I have a mojam.pth file but no "mojam" package on my server. Works
>> just fine.
Ben> Where does it call home? site-packages?
Yup.
--
http://mail.python.org/mailman/listinfo/python-list
On 22 Mar 2005 09:29:39 -0800, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>I'm unclear on how .pth files work. Some posts imply they can be
>arbitrarily named, as long as they include the .pth extension, and can
>exist anywhere in the current sys.path. Other documentation seems to
>imply tha
[EMAIL PROTECTED] wrote:
I'm unclear on how .pth files work. Some posts imply they can be
arbitrarily named, as long as they include the .pth extension, and can
exist anywhere in the current sys.path. Other documentation seems to
imply that they must be named .pth, although I'm not sure what
"pac
On Tue, 22 Mar 2005 12:52:28 -0600, Skip Montanaro <[EMAIL PROTECTED]> wrote:
> .pth naming is just a convention so you can easily sort out the
> association for each of multiple pth files. I have a mojam.pth file but no
> "mojam" package on my server. Works just fine.
Interesting.
Where does
Ben> I'm unclear on how .pth files work. Some posts imply they can be
Ben> arbitrarily named, as long as they include the .pth extension, and
Ben> can exist anywhere in the current sys.path. Other documentation
Ben> seems to imply that they must be named .pth, although I'm
Be
37 matches
Mail list logo