Re: path to python in venv

2023-09-27 Thread Thomas Passin via Python-list
On 9/27/2023 2:53 PM, Larry Martell via Python-list wrote: I was under the impression that in a venv the python used would be in the venv's bin dir. But in my venvs I see this in the bin dirs: lrwxrwxrwx 1 larrymartell larrymartell7 Sep 27 11:21 python -> python3 lrwxrwxrwx 1 larrymartell la

Re: path to python in venv

2023-09-27 Thread Peter J. Holzer via Python-list
On 2023-09-27 20:32:25 -, Jon Ribbens via Python-list wrote: > On 2023-09-27, Larry Martell wrote: > > On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via > > Python-list wrote: > >> On 2023-09-27, Larry Martell wrote: > >> > lrwxrwxrwx 1 larrymartell larrymartell7 Sep 27 11:21 python -> >

Re: path to python in venv

2023-09-27 Thread dn via Python-list
On 28/09/2023 09.32, Jon Ribbens via Python-list wrote: On 2023-09-27, Larry Martell wrote: On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list wrote: On 2023-09-27, Larry Martell wrote: I was under the impression that in a venv the python used would be in the venv's bin dir. But

Re: path to python in venv

2023-09-27 Thread Jon Ribbens via Python-list
On 2023-09-27, Larry Martell wrote: > On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list > wrote: >> On 2023-09-27, Larry Martell wrote: >> > I was under the impression that in a venv the python used would be in >> > the venv's bin dir. But in my venvs I see this in the bin dirs: >> > >

Re: path to python in venv

2023-09-27 Thread Mats Wichmann via Python-list
On 9/27/23 13:46, Larry Martell via Python-list wrote: On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list wrote: On 2023-09-27, Larry Martell wrote: I was under the impression that in a venv the python used would be in the venv's bin dir. But in my venvs I see this in the bin dirs:

Re: path to python in venv

2023-09-27 Thread Larry Martell via Python-list
thon-list > Sent: 27 сентября 2023 г. 22:48 > To: Jon Ribbens > Cc: python-list@python.org > Subject: Re: path to python in venv > > > > On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list > > wrote: > > > > > > On 2023-09-27, Larry Ma

RE: path to python in venv

2023-09-27 Thread Niktar Lirik via Python-list
Hi Larry, You could just create venv with option '—copies' For example: python -m venv -–copies .venv From: Larry Martell via Python-list Sent: 27 сентября 2023 г. 22:48 To: Jon Ribbens Cc: python-list@python.org Subject: Re: path to python in venv On Wed, Sep 27, 2023 at 12:42 PM J

Re: path to python in venv

2023-09-27 Thread Larry Martell via Python-list
On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list wrote: > > On 2023-09-27, Larry Martell wrote: > > I was under the impression that in a venv the python used would be in > > the venv's bin dir. But in my venvs I see this in the bin dirs: > > > > lrwxrwxrwx 1 larrymartell larrymartell

Re: path to python in venv

2023-09-27 Thread Jon Ribbens via Python-list
On 2023-09-27, Larry Martell wrote: > I was under the impression that in a venv the python used would be in > the venv's bin dir. But in my venvs I see this in the bin dirs: > > lrwxrwxrwx 1 larrymartell larrymartell7 Sep 27 11:21 python -> python3 > lrwxrwxrwx 1 larrymartell larrymartell 16

Re: Path-like objects in the standard library

2018-08-24 Thread Terry Reedy
On 8/24/2018 5:28 AM, Paul Moore wrote: On Fri, 24 Aug 2018 at 09:57, Torsten Bronger wrote: Hallöchen! Path-like objects are accepted by all path-processing functions in the standard library since Python 3.6. Unfortunately, this is not made explicit everywhere. In particular, if I pass a P

Re: Path-like objects in the standard library

2018-08-24 Thread Paul Moore
On Fri, 24 Aug 2018 at 09:57, Torsten Bronger wrote: > > Hallöchen! > > Path-like objects are accepted by all path-processing functions in > the standard library since Python 3.6. Unfortunately, this is not > made explicit everywhere. In particular, if I pass a Path in the > first argument of su

Re: Path when reading an external file

2016-03-28 Thread ast
"Martin A. Brown" a écrit dans le message de news:mailman.108.1459179618.28225.python-l...@python.org... Greetings, In a program "code.py" I read an external file "foo.txt" supposed to be located in the same directory that "code.py" python/src/code.py python/src/foo.txt In "code.py": f =

Re: Path when reading an external file

2016-03-28 Thread Martin A. Brown
Greetings, > In a program "code.py" I read an external file "foo.txt" supposed > to be located in the same directory that "code.py" > > python/src/code.py > python/src/foo.txt > > In "code.py": f = open('foo.txt', 'r') > > But if I run "python code.py" in an other dir than src/ say in > python/

Re: Path problem with 3.5.1

2016-03-08 Thread Terry Reedy
On 3/8/2016 8:47 AM, leon_heller--- via Python-list wrote: Although I've enabled setting the path when installing 3.5.1 (Win7 x64) I can't run Python from the command line in a terminal window. It works OK on a Raspberry Pi 3! If you type 'PATH' at the command prompt, what is the response? --

Re: Path problems when I am in bash

2015-12-30 Thread xeon Mailinglist
On Wednesday, December 30, 2015 at 2:30:40 AM UTC, Karim wrote: > On 30/12/2015 00:21, xeon Mailinglist wrote: > > I have my source code inside the directory `medusa`, and my unit tests > > inside `tests` dir. Both dirs are inside `medusa-2.0` dir. Here is my file > > structure [1]. > > > > When

Re: Path problems when I am in bash

2015-12-29 Thread Karim
On 30/12/2015 00:21, xeon Mailinglist wrote: I have my source code inside the directory `medusa`, and my unit tests inside `tests` dir. Both dirs are inside `medusa-2.0` dir. Here is my file structure [1]. When I run my tests inside pycharm, everything works fine, but when I try to run my u

Re: Path, strings, and lines

2015-06-13 Thread MRAB
On 2015-06-13 05:48, Malik Rumi wrote: On Friday, June 12, 2015 at 3:31:36 PM UTC-5, Ian wrote: On Fri, Jun 12, 2015 at 1:39 PM, Malik Rumi wrote: > I am trying to find a list of strings in a directory of files. Here is my code: > > # -*- coding: utf-8 -*- > import os > import fileinput > > s2

Re: Path, strings, and lines

2015-06-12 Thread Malik Rumi
On Friday, June 12, 2015 at 6:48:18 PM UTC-5, Chris Angelico wrote: > On Sat, Jun 13, 2015 at 5:39 AM, Malik Rumi wrote: > > for line in lines: > > for item in fileinput.input(s2): > > if line in item: > > with open(line + '_list', 'a+') as l: > > l.append(

Re: Path, strings, and lines

2015-06-12 Thread Malik Rumi
On Friday, June 12, 2015 at 3:31:36 PM UTC-5, Ian wrote: > On Fri, Jun 12, 2015 at 1:39 PM, Malik Rumi wrote: > > I am trying to find a list of strings in a directory of files. Here is my > > code: > > > > # -*- coding: utf-8 -*- > > import os > > import fileinput > > > > s2 = os.listdir('/home/m

Re: Path, strings, and lines

2015-06-12 Thread Chris Angelico
On Sat, Jun 13, 2015 at 5:39 AM, Malik Rumi wrote: > for line in lines: > for item in fileinput.input(s2): > if line in item: > with open(line + '_list', 'a+') as l: > l.append(filename(), filelineno(), line) Ian's already answered your actual question, b

Re: Path, strings, and lines

2015-06-12 Thread Ian Kelly
On Fri, Jun 12, 2015 at 1:39 PM, Malik Rumi wrote: > I am trying to find a list of strings in a directory of files. Here is my > code: > > # -*- coding: utf-8 -*- > import os > import fileinput > > s2 = os.listdir('/home/malikarumi/Projects/P5/shortstories') Note that the filenames that will be

Re: Path Browser seems to be broken

2012-11-20 Thread Terry Reedy
On 11/20/2012 1:23 PM, Peter Otten wrote: Daniel Klein wrote: If you try to expand any of the paths in the Path Browser (by clicking the + sign) then it not only closes the Path Browser but it also closes all other windows that were opened in IDLE, including the IDLE interpreter itself. A Goog

Re: Path Browser seems to be broken

2012-11-20 Thread Peter Otten
Daniel Klein wrote: > If you try to expand any of the paths in the Path Browser (by clicking the > + sign) then it not only closes the Path Browser but it also closes all > other windows that were opened in IDLE, including the IDLE interpreter > itself. > > A Google search doesn't look like this

Re: Path / Listing and os.walk problem.

2010-08-26 Thread Alban Nona
So I found a way to do it, maybe some people could be interested: listNames = [] for n in names: listNames.append('_'.join(n.split('_')[:-1])) #It will cut the last part of the file name convention listNames = list(set(listNames)) #we Delete duplicates from the list, like this we only have wh

Re: Path / Listing and os.walk problem.

2010-08-26 Thread Alban Nona
Hey ! Thank you guys ! It help me a lot ! @Dennis (Gomes): Thanks ! I tried it it worked well but list me the whole files :P (and finally crashed python...lol) I looked at the Peter method and, Im really dumb to didnt tough about defining a pattern like *_v001.0001.exr * like this, it sort me onl

Re: Path / Listing and os.walk problem.

2010-08-26 Thread Peter Otten
Alban Nona wrote: > Hi > > So here is my problem: > > I have my render files that are into a directory like this: > > c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0001.exr > c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0002.exr > c:\log\renderfiles\HPO7_SEQ004_031_VDM_DIF_V001.0003.exr >

Re: path to data files

2010-08-19 Thread Nobody
On Thu, 19 Aug 2010 14:30:34 +0200, Alain Ketterlin wrote: >> If a python module requires a data file to run how would I reference >> this data file in the source in a way that does not depend on whether >> the module is installed system-wide, installed in $HOME/.local or is >> just placed in a di

Re: path to data files

2010-08-19 Thread Alain Ketterlin
Daniel Fetchinson writes: > If a python module requires a data file to run how would I reference > this data file in the source in a way that does not depend on whether > the module is installed system-wide, installed in $HOME/.local or is > just placed in a directory from where the interpreter i

Re: path to data files

2010-08-19 Thread Daniel Fetchinson
>> If a python module requires a data file to run how would I reference >> this data file in the source in a way that does not depend on whether >> the module is installed system-wide, installed in $HOME/.local or is >> just placed in a directory from where the interpreter is fired up? I'd >> like

Re: path to data files

2010-08-19 Thread Daniel Kluev
On Thu, Aug 19, 2010 at 9:25 PM, Daniel Fetchinson < fetchin...@googlemail.com> wrote: > If a python module requires a data file to run how would I reference > this data file in the source in a way that does not depend on whether > the module is installed system-wide, installed in $HOME/.local or

Re: Path difficulties with Python 2.5 running on Cygwin

2009-05-08 Thread Scott David Daniels
walterbyrd wrote: On May 8, 10:01 am, walterbyrd wrote: On May 8, 9:36 am, Jerry Hill wrote: On Fri, May 8, 2009 at 11:29 AM, walterbyrd wrote: I accidently named a script csv.py, put I deleted that. You probably still have a stale csv.pyc in that directory. Delete that too. Okay, I got

Re: Path difficulties with Python 2.5 running on Cygwin

2009-05-08 Thread walterbyrd
On May 8, 10:01 am, walterbyrd wrote: > On May 8, 9:36 am, Jerry Hill wrote: > > > On Fri, May 8, 2009 at 11:29 AM, walterbyrd wrote: > > > I accidently named a script csv.py, put I deleted that. > > > You probably still have a stale csv.pyc in that directory.  Delete that too. > Okay, I got it

Re: Path difficulties with Python 2.5 running on Cygwin

2009-05-08 Thread walterbyrd
On May 8, 9:36 am, Jerry Hill wrote: > On Fri, May 8, 2009 at 11:29 AM, walterbyrd wrote: > > I accidently named a script csv.py, put I deleted that. > > You probably still have a stale csv.pyc in that directory.  Delete that too. > I don't, I am very certain of that. I have also used find to ma

Re: Path difficulties with Python 2.5 running on Cygwin

2009-05-08 Thread Jerry Hill
On Fri, May 8, 2009 at 11:29 AM, walterbyrd wrote: > I accidently named a script csv.py, put I deleted that. You probably still have a stale csv.pyc in that directory. Delete that too. To tell for sure, open the python interpreter and do: import csv print csv.__file__ That will tell you exactl

Re: Path difficulties with Python 2.5 running on Cygwin

2009-05-08 Thread walterbyrd
On May 8, 9:22 am, walterbyrd wrote: > It workerd fine yesterday, but it won't work today. > > I can still run python, but when I try to import csv, I get an error: > > File "/usr/lib/python2.5/csv.py", line 8 in  . . . > > The module is there. I am guessing that python can not find it. I should

Re: path to executing .py file

2009-04-14 Thread tiefeng wu
> > > The path of your script is given by __file__. thanks MRAB, and sorry for such a trivial question :) cheers! tiefeng wu -- http://mail.python.org/mailman/listinfo/python-list

Re: path to executing .py file

2009-04-14 Thread MRAB
tiefeng wu wrote: Hello everybody! I'm working on my code repository (svn) auto-backup script which get hotcopy of svn repository directory to a directory named by date in same location where script file is, it executed by a timer program every 00:00 clock. Everything works fine when I'm testi

Re: Path question

2009-02-08 Thread Gabriel Genellina
En Sun, 08 Feb 2009 10:07:40 -0200, Geert Vancompernolle escribió: Diez B. Roggisch wrote: Geert Vancompernolle schrieb: Hi, I have the following path construction: ./src/__init__.py /main.py /modules/__init__.py /application.py /ui/__init__.py /mainwindow/_

Re: Path question

2009-02-08 Thread Geert Vancompernolle
Diez B. Roggisch wrote: Geert Vancompernolle schrieb: Hi, I have the following path construction: ./src/__init__.py /main.py /modules/__init__.py /application.py /ui/__init__.py /mainwindow/__init__.py /mainwindow.py Now I want to call the meth

Re: Path question

2009-02-03 Thread Scott David Daniels
Geert Vancompernolle wrote: I have the following path construction: ... ./src/__init__.py /main.py /modules/__init__.py /application.py /ui/__init__.py /mainwindow/__init__.py /mainwindow.py I want to call ... 'MainWindow' in module 'mainwindow', f

Re: Path question

2009-02-03 Thread Diez B. Roggisch
Geert Vancompernolle schrieb: Hi, I have the following path construction: ./src/__init__.py /main.py /modules/__init__.py /application.py /ui/__init__.py /mainwindow/__init__.py /mainwindow.py Now I want to call the method 'MainWindow' in the mo

Re: path slashes cleaning

2008-09-05 Thread Michael Wronna
Am 04.09.2008, 15:27 Uhr, schrieb Mike Driscoll <[EMAIL PROTECTED]>: On Sep 4, 8:25 am, "Mathieu Prevot" <[EMAIL PROTECTED]> wrote: Hi, for scripts that take arguments, I would like to remove the trailing slash if it's present. Is there something else than: a='/usr/local/lib/' if a[-1] == '/

Re: path slashes cleaning

2008-09-04 Thread Jason Scheirer
On Sep 4, 6:32 am, "Francesco Guerrieri" <[EMAIL PROTECTED]> wrote: > On Thu, Sep 4, 2008 at 3:25 PM, Mathieu Prevot <[EMAIL PROTECTED]> wrote: > > Hi, > > > for scripts that take arguments, I would like to remove the trailing > > slash if it's present. > > > Is there something else than: > > > a='

Re: path slashes cleaning

2008-09-04 Thread Francesco Guerrieri
On Thu, Sep 4, 2008 at 3:25 PM, Mathieu Prevot <[EMAIL PROTECTED]> wrote: > Hi, > > for scripts that take arguments, I would like to remove the trailing > slash if it's present. > > Is there something else than: > > a='/usr/local/lib/' > if a[-1] == '/': > a = list(a) > a.pop() > ''.join(a) > >

Re: path slashes cleaning

2008-09-04 Thread Mathieu Prevot
2008/9/4 Mathieu Prevot <[EMAIL PROTECTED]>: > Hi, > > for scripts that take arguments, I would like to remove the trailing > slash if it's present. > > Is there something else than: > > a='/usr/local/lib/' > if a[-1] == '/': > a = list(a) > a.pop() > ''.join(a) A dummy a.rstrip('/') Sorry fo

Re: path slashes cleaning

2008-09-04 Thread Mike Driscoll
On Sep 4, 8:25 am, "Mathieu Prevot" <[EMAIL PROTECTED]> wrote: > Hi, > > for scripts that take arguments, I would like to remove the trailing > slash if it's present. > > Is there something else than: > > a='/usr/local/lib/' > if a[-1] == '/': >   a = list(a) >   a.pop() >   ''.join(a) > > Thanks,

Re: path error

2007-07-20 Thread godavemon
On Jul 20, 11:45 am, godavemon <[EMAIL PROTECTED]> wrote: > On Jul 20, 11:42 am, godavemon <[EMAIL PROTECTED]> wrote: > > > I'm on an intel macbook using OS X 10.4 and for some reason my path is > > being interpreted incorrectly. See the example: > > > [EMAIL PROTECTED] pwd > > /Users/dave/til/jar

Re: path error

2007-07-20 Thread godavemon
On Jul 20, 11:42 am, godavemon <[EMAIL PROTECTED]> wrote: > I'm on an intel macbook using OS X 10.4 and for some reason my path is > being interpreted incorrectly. See the example: > > [EMAIL PROTECTED] pwd > /Users/dave/til/jared <- dirname = jared > [EMAIL PROTECTED] python > ...>>> impo

Re: path backslash escaping trouble

2007-07-11 Thread placid
On Jul 11, 10:37 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 09 Jul 2007 22:40:04 -0300, placid <[EMAIL PROTECTED]> escribió: > > > > > I have these files; which are Merge Request (ClearCase) files that are > > created by a Perl CGI script (being re-written in Python, as the HTML/

Re: path backslash escaping trouble

2007-07-10 Thread Gabriel Genellina
En Mon, 09 Jul 2007 22:40:04 -0300, placid <[EMAIL PROTECTED]> escribió: > I have these files; which are Merge Request (ClearCase) files that are > created by a Perl CGI script (being re-written in Python, as the HTML/ > JavaScript have been mixed with Perl, maintainability is zero) > > MergeType:

Re: path backslash escaping trouble

2007-07-10 Thread Sion Arrowsmith
placid <[EMAIL PROTECTED]> wrote: >I have these files; [ ... ] > >MergeTypecodefromlabel >BLnameBUILDMODS >OldLname >BaseVersion6.9.1.24A >RequiredRelease6.10.1.3 >Description >FixRelation >Dependencies >LpAffectedNo >CodeRevi

Re: PATH or PYTHONPATH under Windows ???

2007-06-06 Thread stef
Giuseppe Di Martino wrote: > Il Wed, 06 Jun 2007 12:01:13 +0200, stef ha scritto: > > >>> >>> >> I ran your program but it didn't solve the problem (running Python, >> embedded in Delphi). >> I'm beginning to get the feeling that Python installation is a very >> complex case. >> Anyw

Re: PATH or PYTHONPATH under Windows ???

2007-06-06 Thread Diez B. Roggisch
> but why is everybody alwasy talking about the "environment variable > PYTHONPATH" ?? Because that variable can be used to additionally customize the search path. But that doesn't imply that it is _all_ there is about python search paths - and it would be pretty crappy if it was, because you can

Re: PATH or PYTHONPATH under Windows ???

2007-06-06 Thread Giuseppe Di Martino
Il Wed, 06 Jun 2007 12:01:13 +0200, stef ha scritto: >> > I ran your program but it didn't solve the problem (running Python, > embedded in Delphi). > I'm beginning to get the feeling that Python installation is a very > complex case. > Anyway thanks. > In the original post you don't mentio

Re: PATH or PYTHONPATH under Windows ???

2007-06-06 Thread stef
Thorsten Kampe wrote: > * Stef Mientki (Tue, 05 Jun 2007 23:57:15 +0200) > >> after cleaning up a PC, >> > > Uou purposely deleted things you had no clue about?! > Yes, but you should have seen what a "professional" package like LabView / LabWindows, all had installed on my PC ;-) >

Re: PATH or PYTHONPATH under Windows ???

2007-06-06 Thread stef
Giuseppe Di Martino wrote: > Il Tue, 05 Jun 2007 23:57:15 +0200, Stef Mientki ha scritto: > > >> hello, >> >> after cleaning up a PC, Python can't find any libraries anymore. >> But happily I've still one PC, where Python is running perfect. >> Now I always read about the environment variable "P

Re: PATH or PYTHONPATH under Windows ???

2007-06-06 Thread Thorsten Kampe
* Stef Mientki (Tue, 05 Jun 2007 23:57:15 +0200) > after cleaning up a PC, Uou purposely deleted things you had no clue about?! > Python can't find any libraries anymore. > But happily I've still one PC, where Python is running perfect. > Now I always read about the environment variable "PYTHONPA

Re: PATH or PYTHONPATH under Windows ???

2007-06-05 Thread Joe Salmeri
Modify the PATHEXT environment variable to include .py; For example the default one on Windows XP is: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH; Modify it so it says: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py Now you can run python programs from your c

Re: PATH or PYTHONPATH under Windows ???

2007-06-05 Thread Giuseppe Di Martino
Il Tue, 05 Jun 2007 23:57:15 +0200, Stef Mientki ha scritto: > hello, > > after cleaning up a PC, Python can't find any libraries anymore. > But happily I've still one PC, where Python is running perfect. > Now I always read about the environment variable "PYTHONPATH". > But on neither PC there e

Re: Path python versions and Macosx

2007-05-20 Thread andrea
On 14 Mag, 23:00, [EMAIL PROTECTED] wrote: > On May 14, 4:46 am, andrea <[EMAIL PROTECTED]> wrote: > > > > > On 12 Mag, 01:09, [EMAIL PROTECTED] wrote: > > > > On May 11, 1:36 pm, andrea <[EMAIL PROTECTED]> wrote: > > > > > Hi everyone, > > > > I use python on macosx with textmate as editor (great

Re: Path python versions and Macosx

2007-05-14 Thread half . italian
On May 14, 4:46 am, andrea <[EMAIL PROTECTED]> wrote: > On 12 Mag, 01:09, [EMAIL PROTECTED] wrote: > > > > > On May 11, 1:36 pm, andrea <[EMAIL PROTECTED]> wrote: > > > > Hi everyone, > > > I use python on macosx with textmate as editor (great program). > > > > I also use macport to install unix pr

Re: Path python versions and Macosx

2007-05-14 Thread andrea
On 12 Mag, 01:09, [EMAIL PROTECTED] wrote: > On May 11, 1:36 pm, andrea <[EMAIL PROTECTED]> wrote: > > > > > Hi everyone, > > I use python on macosx with textmate as editor (great program). > > > I also use macport to install unix programs from the command line and > > I find it great too. > > Well

Re: path stuff

2007-05-12 Thread BartlebyScrivener
On May 9, 1:11 pm, fscked <[EMAIL PROTECTED]> wrote: > I am walking some directories looking for a certain filename pattern. > This part works fine, but what if I want to exclude results from a > certain directory being printed? You might find this thread helpful http://tinyurl.com/2guk3l Note h

Re: path stuff

2007-05-11 Thread Gabriel Genellina
En Fri, 11 May 2007 13:25:55 -0300, fscked <[EMAIL PROTECTED]> escribió: >> import os, sys, os.path, fnmatch >> >> def findinterestingfiles(root_dir): >>for dirpath, dirnames, filenames in os.walk(root_dir): >> if "Archived" in dirnames: >>dirnames.remove("Archived") >> for

Re: Path python versions and Macosx

2007-05-11 Thread half . italian
On May 11, 1:36 pm, andrea <[EMAIL PROTECTED]> wrote: > Hi everyone, > I use python on macosx with textmate as editor (great program). > > I also use macport to install unix programs from the command line and > I find it great too. > Well I would like to have all my modules in the path when I'm usi

Re: path stuff

2007-05-11 Thread fscked
On May 10, 6:08 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 10 May 2007 19:04:30 -0300, fscked <[EMAIL PROTECTED]> > escribió: > > > > > > > ok, I lied, it is still doing the archived folders. Here is the code: > > > import os, sys > > from path import path > > > myfile = open("b

Re: path stuff

2007-05-10 Thread Gabriel Genellina
En Thu, 10 May 2007 19:04:30 -0300, fscked <[EMAIL PROTECTED]> escribió: > ok, I lied, it is still doing the archived folders. Here is the code: > > import os, sys > from path import path > > myfile = open("boxids.txt", "r", 0) > for line in myfile: > d = 'D:\\Dir\\' + path(line.strip()) >

Re: path stuff

2007-05-10 Thread fscked
On May 10, 1:43 pm, fscked <[EMAIL PROTECTED]> wrote: > On May 10, 12:45 pm, fscked <[EMAIL PROTECTED]> wrote: > > > > > > > On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > > > > On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > > En Wed, 09 May 2007 15:11:06 -0300,

Re: path stuff

2007-05-10 Thread fscked
On May 10, 12:45 pm, fscked <[EMAIL PROTECTED]> wrote: > On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > > > > > > > On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> > > > escribió: > > > > > I am wal

Re: path stuff

2007-05-10 Thread fscked
On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > > > > En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> > > escribió: > > > > I am walking some directories looking for a certain filename pattern. > > >

Re: path stuff

2007-05-10 Thread fscked
On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> > escribió: > > > I am walking some directories looking for a certain filename pattern. > > This part works fine, but what if I want to exclude results from a > > cer

Re: path stuff

2007-05-09 Thread Gabriel Genellina
En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> escribió: > I am walking some directories looking for a certain filename pattern. > This part works fine, but what if I want to exclude results from a > certain directory being printed? Using os.walk you can skip undesired directori

Re: path stuff

2007-05-09 Thread kyosohma
On May 9, 1:11 pm, fscked <[EMAIL PROTECTED]> wrote: > I am walking some directories looking for a certain filename pattern. > This part works fine, but what if I want to exclude results from a > certain directory being printed? > > eg > > d:\dir\mydir1\filename.txt <--

Re: Path?

2006-09-06 Thread Dr. Pastor
Many thanks, Sir. == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News== http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups = East and West-Coast Server Farms - Total Privacy via Encryption = -- http://mail.python.org/mailman/l

Re: Path?

2006-09-06 Thread Steve Holden
Dr. Pastor wrote: > I installed Python 2.5 on Windows XP. > I got the following system that works well. > --- > Python 2.5b3 (r25b3:51041, Aug 3 2006, 09:35:06) [MSC v.1310 32 bit > (Intel)] on > win32 Type "copyright", "credits" or "license()" for more information. > > IDLE 1.2b3 > >>> import

Re: path to modules per import statement

2006-03-24 Thread Peter Hansen
AndyL wrote: > [EMAIL PROTECTED] wrote: > I work on rather big set of Python applications: something like 100 .py > files divided into libs and separate sub-applications. > > For now I keep almost everything in one directory but I wish following > structure to be in place: > > app1/ app2

Re: path to modules per import statement

2006-03-24 Thread Fuzzyman
AndyL wrote: > [EMAIL PROTECTED] wrote: > >>For instance: "import my.path.module" would load module from > >>./my/path/module.py? > > > > > > Yeah, just do that. I don't understand the question, it works just like > > this today. > > > > I work on rather big set of Python applications: something l

Re: path to modules per import statement

2006-03-24 Thread AndyL
[EMAIL PROTECTED] wrote: >>For instance: "import my.path.module" would load module from >>./my/path/module.py? > > > Yeah, just do that. I don't understand the question, it works just like > this today. > I work on rather big set of Python applications: something like 100 .py files divided int

Re: path to modules per import statement

2006-03-23 Thread Arne Ludwig
Maybe he means: sys.path.append('/my/path') -- http://mail.python.org/mailman/listinfo/python-list

Re: path to modules per import statement

2006-03-23 Thread [EMAIL PROTECTED]
As an example, let's say you have a main module at /usr/code/Main.py and you have a module you'd like to import at /usr/code/util/Util.py, you can do this: import util.Util If you are using PyDev and Eclipse to develop your Python code, you can set the base directory to reference module imports f

Re: path to modules per import statement

2006-03-23 Thread [EMAIL PROTECTED]
>For instance: "import my.path.module" would load module from >./my/path/module.py? Yeah, just do that. I don't understand the question, it works just like this today. -- http://mail.python.org/mailman/listinfo/python-list

Re: Path completion in 'raw-input'?

2006-03-01 Thread Mc Osten
On Wed, 01 Mar 2006 10:00:43 -0800, Johannes Graumann wrote: > There's also the rlcompleter module, but in the interest of better platform > agnosis I'd like to stick with cmd ... I would have suggested readline.. This works on Windows: Th

Re: Path (graph) shower utility

2006-02-25 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > Thank you Jorgen, now I understand the question, and the answer isn't > difficult :-) > > Graphviz is good enough for this purpose. > >> but IIRC there are Python bindings for it as well.< > ... > There are other libs around, I have seen a new one quite recently. Perha

Re: Path (graph) shower utility

2006-02-25 Thread bearophileHUGS
Thank you Jorgen, now I understand the question, and the answer isn't difficult :-) Graphviz is good enough for this purpose. >but IIRC there are Python bindings for it as well.< Durumdara can use an email module to extract data, then a graph library to create the graph, and then save the result

Re: Path (graph) shower utility

2006-02-25 Thread Jorgen Grahn
On Wed, 22 Feb 2006 11:31:15 +0100, Durumdara <[EMAIL PROTECTED]> wrote: > Hi ! > > I need to create a program that read eml file headers, analyze the You mean "email". Took me some time to figure out. > receive tags and create a path database. I fi

Re: path to python in WinXP

2006-01-31 Thread BartlebyScrivener
tim> For a more persistant solution, go to your system tim> properties and dig around for the "Environment variables" tim> button. I've got Win2k here, not XP, so I don't know the tim> exact sequence, but here it is on Win2k Sequence on XP is Start | Control Panel | System | Advanced | Environmen

Re: path to python in WinXP

2006-01-31 Thread Tim Chase
> I have a real newbie question here. Well, as a starter, it would be helpful if you included a Subject: line in your mail...my spam filters flagged it and I almost tossed it in my bit-bucket because the subject was empty. :*) > On WinXP I open a command line and type 'python' and get 'PYTHON'

Re: Path and Unicode woes

2006-01-07 Thread Fuzzyman
Not full help - but still a pointer. E%3A/ isn't a unicode issue - but a value that is HTML escaped. MEaning (I presume without looking it up) 'E:/' - your file path. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: path module / class

2005-11-21 Thread [EMAIL PROTECTED]
Peter Hansen wrote: > Okay, granted. I guess this is the same as in any other case of > deprecation (e.g. some people still have to work with code that uses > apply() or string module methods). Yup, this is exactly what will have to happen. Most or all of os.path and maybe some of os/glob/fnmatc

Re: path module / class

2005-11-20 Thread Peter Hansen
Neil Hodgson wrote: >>> There is a cost to the change as there will be two libraries that >>> have to be known to understand code. ... >At that point I was thinking about os.path and path.py. Readers will > encounter code that uses both of these libraries. Okay, granted. I guess this is th

Re: path module / class

2005-11-20 Thread Neil Hodgson
Peter Hansen: >> There is a cost to the change as there will be two libraries that have >> to be known to understand code. > > Could you please clarify? Which two do you mean? At that point I was thinking about os.path and path.py. Readers will encounter code that uses both of these libr

Re: PATH environment variable

2005-11-20 Thread mirandacascade
Fredrik Lundh wrote: > what part of your observations makes you think that the environment isn't > "captured" (i.e. > copied from the process environment) when the os module is > imported ? Answer: the part that was informed by a fundamental misunderstanding on my part of how the os module obtai

Re: PATH environment variable

2005-11-20 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Do these observations fit with what is stated in section 6.1.1 of the > Python Library Reference? yes. what part of your observations makes you think that the environment isn't "captured" (i.e. copied from the process environ- ment) when the os module is imported ? (h

Re: PATH environment variable

2005-11-20 Thread mirandacascade
I observed something tangential to this topic, and that is the reason for this reply. I don't understand when os.environ gets updated. The '...captured the first time the os mdule is imported...' verbiage from the following link: http://www.python.org/dev/doc/newstyle/lib/os-procinfo.html provi

Re: PATH environment variable

2005-11-20 Thread Jeffrey Schwab
[EMAIL PROTECTED] wrote: > O/S: Win2K > Vsn of Python:2.4 > > Based on a search of other posts in this group, it appears as though > os.environ['PATH'] is one way to obtain the PATH environment variable. > > My questions: > 1) is it correct that os.environ['PATH'] contains the PATH environment >

Re: PATH environment variable

2005-11-20 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Based on a search of other posts in this group, it appears as though > os.environ['PATH'] is one way to obtain the PATH environment variable. > > My questions: > 1) is it correct that os.environ['PATH'] contains the PATH environment > variable? yes. > 2) are there othe

Re: path module / class

2005-11-19 Thread Peter Hansen
Neil Hodgson wrote: >To me, most uses of path.py are small incremental improvements over > os.path rather than being compelling. Do a number of small improvements > add up to be large enough to make this change? If the number of small improvements is large enough then, as with other such

Re: path module / class

2005-11-19 Thread Neil Hodgson
Peter Hansen: > Compelling to whom? I wonder if it's even possible for Guido to find > compelling anything which obsoletes much of os.path and shutil and > friends (modules which Guido probably added first and has used the most > and feels most comfortable with). To me, most uses of path.

Re: path module / class

2005-11-18 Thread Peter Hansen
Neil Hodgson wrote: > Chris: > >> What is the status of the path module/class PEP? Did somebody start >> writing one, or did it die? I would really like to see something like >> Jason Orendorff's path class make its way into the python standard >> library. > >There is no PEP yet but there i

Re: path module / class

2005-11-18 Thread [EMAIL PROTECTED]
Hi Neil, Neil Hodgson wrote: [snip] > There is no PEP yet but there is a wiki page. > http://wiki.python.org/moin/PathClass > Guido was unenthusiastic so a good step would be to produce some > compelling examples. I guess it depends on what is "compelling" :) I've been trying to come up

  1   2   3   >