Python script pulling data from XML file for Eve-Online data - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Python Programming Language (https://www.supportforums.net/forumdisplay.php?fid=32) +---- Thread: Python script pulling data from XML file for Eve-Online data (/showthread.php?tid=2752) |
Python script pulling data from XML file for Eve-Online data - J4P4NM4N - 11-09-2009 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: Code: #!/usr/bin/python And the following is a portion of the XML file: Code: <eveapi version="2"> 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 Can anybody interpret those compile errors? This is from running that script that I first posted above. RE: Python script pulling data from XML file for Eve-Online data - J4P4NM4N - 11-10-2009 Well, you guys were basically no help. Haha, no worries, though. I spent all night reading, plus trial-and-error [Note: I knew nothing about Python going into it], and eventually developed this little script: Code: #!/usr/bin/env python And modified the search tag for each script I was using. So, another project down. Plus, check out my screenshot: Sweet, right? Eh, probably not if you're not into Eve [most of you aren't]. And from here, there's actually a lot more I could do with it, such as listing my specific skills or skills I'm training on. I've discovered that XML is pretty freaking awesome! |