Re: File Path retrieving problem

2009-02-26 Thread Steve Holden
Dennis Lee Bieber wrote: > On Wed, 25 Feb 2009 07:37:21 -0800 (PST), music24...@gmail.com declaimed > the following in comp.lang.python: > > WARNING -- I will probably NOT see your response; since 90+% of the > spam in comp.lang.python is injected via googlegroups and gmail > accounts, my cl

Re: File Path retrieving problem

2009-02-26 Thread Steve Holden
music24...@gmail.com wrote: > On Feb 26, 9:03 am, Steve Holden wrote: >> music24...@gmail.com wrote: >>> On Feb 26, 2:35 am, Emile van Sebille wrote: Peter Otten wrote: > Maybe it's about access rights? > $ mkdir alpha > $ touch alpha/beta > $ python -c"import os; print os.pa

Re: File Path retrieving problem

2009-02-26 Thread music24by7
Hi Dennis Thanks for your reply and also the detailed explanation. > Or do you mean you want something that, given a bare name, searches > your file system to find where a file with that name actually is? > Yes, this is what i exactly needed. I have found something interesting to do this

Re: File Path retrieving problem

2009-02-25 Thread John Machin
On Feb 26, 3:16 pm, music24...@gmail.com wrote: > On Feb 26, 9:03 am, Steve Holden wrote: > > > > > music24...@gmail.com wrote: > > > On Feb 26, 2:35 am, Emile van Sebille wrote: > > >> Peter Otten wrote: > > >>> Maybe it's about access rights? > > >>> $ mkdir alpha > > >>> $ touch alpha/beta > >

Re: File Path retrieving problem

2009-02-25 Thread music24by7
On Feb 26, 9:03 am, Steve Holden wrote: > music24...@gmail.com wrote: > > On Feb 26, 2:35 am, Emile van Sebille wrote: > >> Peter Otten wrote: > >>> Maybe it's about access rights? > >>> $ mkdir alpha > >>> $ touch alpha/beta > >>> $ python -c"import os; print os.path.exists('alpha/beta')" > >>>

Re: File Path retrieving problem

2009-02-25 Thread Steve Holden
music24...@gmail.com wrote: > On Feb 26, 2:35 am, Emile van Sebille wrote: >> Peter Otten wrote: >>> Maybe it's about access rights? >>> $ mkdir alpha >>> $ touch alpha/beta >>> $ python -c"import os; print os.path.exists('alpha/beta')" >>> True >>> $ chmod u-x alpha >>> $ python -c"import os; pri

Re: File Path retrieving problem

2009-02-25 Thread music24by7
On Feb 26, 2:35 am, Emile van Sebille wrote: > Peter Otten wrote: > > Maybe it's about access rights? > > > $ mkdir alpha > > $ touch alpha/beta > > $ python -c"import os; print os.path.exists('alpha/beta')" > > True > > $ chmod u-x alpha > > $ python -c"import os; print os.path.exists('alpha/beta

Re: File Path retrieving problem

2009-02-25 Thread Emile van Sebille
Peter Otten wrote: Maybe it's about access rights? $ mkdir alpha $ touch alpha/beta $ python -c"import os; print os.path.exists('alpha/beta')" True $ chmod u-x alpha $ python -c"import os; print os.path.exists('alpha/beta')" False $ I Don't know how this is handled on Windows... Here's one w

Re: File Path retrieving problem

2009-02-25 Thread Peter Otten
Steve Holden wrote: > What, you are saying that > > os.path.exists(filename) > > is returning false when the file exists? I find that hard to believe. > > Please display some evidence so I can understand this. Maybe it's about access rights? $ mkdir alpha $ touch alpha/beta $ python -c"import

Re: File Path retrieving problem

2009-02-25 Thread Steve Holden
music24...@gmail.com wrote: > On Feb 25, 8:57 pm, Steve Holden wrote: >> music24...@gmail.com wrote: >>> Hi all, >>> I am new to Python, i have installed python 2.5.4 and it is my >>> requirement. >>> I need to retrieve the path of filename in python. >>> I have found some API's to get this: >>> f

Re: File Path retrieving problem

2009-02-25 Thread music24by7
On Feb 25, 8:57 pm, Steve Holden wrote: > music24...@gmail.com wrote: > > Hi all, > > > I am new to Python, i have installed python 2.5.4 and it is my > > requirement. > > > I need to retrieve the path of filename in python. > > > I have found some API's to get this: > > > from os.path import real

Re: File Path retrieving problem

2009-02-25 Thread Steve Holden
music24...@gmail.com wrote: > Hi all, > > I am new to Python, i have installed python 2.5.4 and it is my > requirement. > > I need to retrieve the path of filename in python. > > I have found some API's to get this: > > from os.path import realpath > print realpath("NEWS.txt") # here NEWS.txt