Reading a file in same directory as code with relative path

dan.j.weber at gmail.com dan.j.weber at gmail.com
Thu Nov 17 20:29:55 EST 2005


I'm trying to read an XML file in the same directory as my python code,
using minidom:

document = xml.dom.minidom.parse("data.xml")

How can I read in the file "data.xml" without knowing it's full
path--just that it's in the same directory as my code file? Thanks for
any help with this. I'm new to python and really liking it so far.




More information about the Python-list mailing list