Returning the path of a file
Daniel Klein
danielk at aracnet.com
Fri Jan 5 10:31:56 EST 2001
I've search the Beazley book as well as the Python reference materials
and can't find answers to these two basically simple questions:
1) How to return the path of a file previously opened in read-only
mode?
myfile = open("foo")
I know I can do something like
os.getcwd()
and this is where 'myfile' is, but if the file was opened by some
other method, I would like to be able to interrogate where it was
opened from.
2) Is there a builtin or method to delete a file or do I have to
execute an os process to do this?
experiencing-python-growing-pains-ly y'rs,
Daniel Klein
Portland, OR USA
More information about the Python-list
mailing list