Getting a path from a file object

Andrew Fong FongAndrew at
Fri Jul 4 20:37:37 CEST 2008

Newbie question:

Let's say I open a new file for writing in a certain path. How do I
get that path back?


>>> f = open('/some/path/file.ext')
>>> some_function(f)

Does some_function(f) already exist? And if not, how would I define

-- Andrew

More information about the Python-list mailing list