11-09-2009, 05:57 PM
I'm in Ubuntu using Conky. I also play EVE-Online [and if you do, "No, I do not want to join your corp"]. I have this set of Python scripts that pull data from XML files that get my character status and other info. The problem is that the whole thing doesn't work; Nothing is outputted to my Conky. Seeing as I am unfamiliar with Python, I thought I'd ask you guys for some support.
I know that I'm getting the info OK because I can open the XML files and see perfectly clear that it contains a bunch of stuff about my character.
So let me just give you an example of what I'm dealing with; The following script gets my character name from the XML file:
And the following is a portion of the XML file:
So the "print" command in that python script doesn't work; Why not?
Okay, further development: I tried running the Python script by itself in a terminal [works OK with my Gmail python script I use in Conky], but the following is the output:
Can anybody interpret those compile errors? This is from running that script that I first posted above.
I know that I'm getting the info OK because I can open the XML files and see perfectly clear that it contains a bunch of stuff about my character.
So let me just give you an example of what I'm dealing with; The following script gets my character name from the XML file:
Code:
#!/usr/bin/python
from xml.dom.minidom import parse
from xml import xpath
import os
doc = parse("/home/me/eve/character.xml")
print doc.getElementsByTagName("name")[0].childNodes[0].nodeValue,
And the following is a portion of the XML file:
Code:
<eveapi version="2">
<currentTime>2009-11-10 00:53:09</currentTime>
<result>
<characterID>57371xxxx</characterID>
<name>[My Name]</name>
<race>Gallente</race>
<bloodLine>Gallente</bloodLine>
<gender>Male</gender>
. . . .etc, etc, etc. . . .
So the "print" command in that python script doesn't work; Why not?
Okay, further development: I tried running the Python script by itself in a terminal [works OK with my Gmail python script I use in Conky], but the following is the output:
Code:
xxx@xxx:~$ python /home/me/eve/eve-name.py
Traceback (most recent call last):
File "/home/me/eve/eve-name.py", line 3, in <module>
from xml import xpath
File "/usr/lib/python2.6/dist-packages/_xmlplus/xpath/__init__.py", line 105, in <module>
import Context
File "/usr/lib/python2.6/dist-packages/_xmlplus/xpath/Context.py", line 15, in <module>
import CoreFunctions
File "/usr/lib/python2.6/dist-packages/_xmlplus/xpath/CoreFunctions.py", line 20, in <module>
from xml.xpath import Util, Conversions
File "/usr/lib/python2.6/dist-packages/_xmlplus/xpath/Conversions.py", line 22, in <module>
from xml.utils import boolean
ImportError: cannot import name boolean
Can anybody interpret those compile errors? This is from running that script that I first posted above.