python - Reading a file from Rhythmbox plugin -
In my plugin for rhythmbox I need to read the data from the XML file. I am similar to the XML file script. I read the file: xml.dom.minidom import parse doc = pars ('sites.xml') from
I get an error saying That file is not found. I came to know that do not see the script in the home folder in / usr / lib / rhythmbox / plugins / myfoder / Is this an error of my script or just a limitation of rhythmbox? Thank you.
Try adding the address directly. import from xml.dom.minidom import paras OS BASE_DIR = os.path.dirname (os.path.abspath (__ file__)) xmlfile = os.path .join (BASE_DIR, 'sites .xml ') doc = parse (xmlfile)
Comments
Post a Comment