Obtaining a full path name from file
Ulrich Eckhardt
ulrich.eckhardt at dominolaser.com
Wed May 25 02:36:11 EDT 2011
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 directory entries can point to the same file, all of which can be
changed (including deletion!) even while you have the file open.
I'm not sure what problem you're trying to solve, but I'm afraid your
approach is at least limited.
Good luck!
Uli
--
Domino Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
More information about the Python-list
mailing list