On 01/-10/-28163 02:59 PM, RVince wrote:
s = "C:\AciiCsv\Gravity_Test_data\A.csv"
f = open(s,"r")
How do I obtain the full pathname given the File, f? (which should
equal "C:\AciiCsv\Gravity_Test_data"). I've tried all sorts of stuff
and am just not finding it. Any help greatly appreciated !
On 25/05/2011 07:36, Ulrich Eckhardt wrote:
RVince wrote:
s = "C:\AciiCsv\Gravity_Test_data\A.csv"
f = open(s,"r")
How do I obtain the full pathname given the File, f?
Apart from the issue that the 'name' attribute is only the name used to open
the file, there is another issue, though not on
RVince wrote:
> s = "C:\AciiCsv\Gravity_Test_data\A.csv"
> f = open(s,"r")
>
> How do I obtain the full pathname given the File, f?
Apart from the issue that the 'name' attribute is only the name used to open
the file, there is another issue, though not on the platform you're using:
Multiple di
If a filename does not contain a path component, os.path.abspath will prepend
the current directory path onto it.
--
http://mail.python.org/mailman/listinfo/python-list
RVince wrote:
Ha! You;re right -- but is there a way to get it without the filename
appended at the end?
On May 24, 11:52 am, Tim Golden wrote:
On 24/05/2011 16:36, RVince wrote:
s = "C:\AciiCsv\Gravity_Test_data\A.csv"
f = open(s,"r")
How do I obtain the full pathname given t
On 24/05/2011 17:04, RVince wrote:
Ha! You;re right -- but is there a way to get it without the filename
appended at the end?
Well, just use the functions in os.path, specifically os.path.dirname...
TJG
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, May 25, 2011 at 2:04 AM, RVince wrote:
> Ha! You;re right -- but is there a way to get it without the filename
> appended at the end?
Parse the file name with the os.path functions:
http://docs.python.org/library/os.path.html
Chris Angelico
--
http://mail.python.org/mailman/listinfo/py
Tim Golden wrote:
> On 24/05/2011 16:36, RVince wrote:
>> s = "C:\AciiCsv\Gravity_Test_data\A.csv"
>> f = open(s,"r")
>>
>> How do I obtain the full pathname given the File, f? (which should
>> equal "C:\AciiCsv\Gravity_Test_data"). I've tried all sorts of stuff
>> and am just not finding it. Any
Ha! You;re right -- but is there a way to get it without the filename
appended at the end?
On May 24, 11:52 am, Tim Golden wrote:
> On 24/05/2011 16:36, RVince wrote:
>
> > s = "C:\AciiCsv\Gravity_Test_data\A.csv"
> > f = open(s,"r")
>
> > How do I obtain the full pathname given the File, f? (whi
On 24/05/2011 16:36, RVince wrote:
s = "C:\AciiCsv\Gravity_Test_data\A.csv"
f = open(s,"r")
How do I obtain the full pathname given the File, f? (which should
equal "C:\AciiCsv\Gravity_Test_data"). I've tried all sorts of stuff
and am just not finding it. Any help greatly appreciated !
You're
s = "C:\AciiCsv\Gravity_Test_data\A.csv"
f = open(s,"r")
How do I obtain the full pathname given the File, f? (which should
equal "C:\AciiCsv\Gravity_Test_data"). I've tried all sorts of stuff
and am just not finding it. Any help greatly appreciated !
--
http://mail.python.org/mailman/listinfo/py
11 matches
Mail list logo