View Full Version : How can i get debug output?
El Piranna
2007-04-30, 19:55
As i promised i'm doing some little experiments with python with not so bad results, but i have som problems running it on XBMC_PC and the XBox (it's said: scripts work more or less property on the computer using the XBMC Python Script Emulator but no more). I have tried to read the xbmc.log on the XBMC_PC but it doesn't say almost nothing ("script error", no more), and without "white button" i can't be able to see the python console output, so how can i see the error messages?
And other little thing... i have seen several errors on python implementation, for example Label has the SetText method but FadeLabel, who should inheritage from Label, not. And it happens with background color with buttons, that are the only one control that have them and (i think) are more usefull on labels. What can i be able to do to "repair" this problems? Where must i to look for related code (more explicit that "in the svn" :p )?
I promise that (maybe, i hope) you will like the scripts i'm doing, but, well... i don't know why they work on my PC and not on XBMC :(
Nuka1195
2007-04-30, 21:35
press i for the scripts info window.
Use a button with no textures for a label if you want to change colors after creation or if you only need two colors for the label, you can use the disabledcolor and textcolor and just setEnable() the label.
Thor918 hosts the python docs, search for one of his posts, link should be in his signature. Maybe xbmcscripts.com has them also.
You can also activate the window 'scriptsdebuginfo' from the menubar in case the controls have locked up.
I would recommend simply logging your debug data to a file since that is easier to analyze in case things lock up.
Also yeah controls dont necessarilly inherit in ways that make sense :) they are all derived from xbmcgui.Control but not from anything else. I have a decent collection of reference data in my sig but the wiki has some more i think.
El Piranna
2007-04-30, 22:37
Ok, ok, i get the point: xbmcGui is a mess and i have to deal with it :p
I'll look for it the Thursday at university because here we are in holydays and i have Windows 98 at home, so i can't try it. By the way, i'll redirect sys.stderr to a file so i could be able to see what's happening.
And yeah, disableColor is a good hack for the thing i like it ;) I'll look for Thor918 docs to see if i can help a little with the gui mess.
P.D.: Asteron: yes, i know A LOT that you a lot of reference data in your signature... it's almost all what i have been using! :p
El Piranna
2007-04-30, 22:45
Uops... I have look for Thor918 docs and i have found xbmcscrips ones are old fashioned...
XbmcScripts:
http://www.xbmcscripts.com/downloads/documentation/xbmc.html
http://www.xbmcscripts.com/downloads/documentation/xbmcgui.html
Thor918:
http://home.no.net/thor918/xbmc/xbmcgui.html
http://home.no.net/thor918/xbmc/xbmc.html
Asteron, you should change the urls on your doc page... I'll go to change it the wiki ones (i put them from there...)
El Piranna
2007-04-30, 23:41
(You will be tired about me, i know ;) )
I just have been looking for XBMC source code python related, and well... where is the code of modules???
http://xbmc.svn.sourceforge.net/viewvc/xbmc/trunk/XBMC/system/python/
At the readme (http://xbmc.svn.sourceforge.net/viewvc/xbmc/trunk/XBMC/system/python/readme.txt?view=markup) it says that modules as xbmc.py and xbmcgui.py should be installed on Lib directory, but that directory doesn't exist. I have been looking for all the XBMC source tree without success, so where is that code? Where i can go to see it and try to expand it?