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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -