Python Interpreter Development "Python Inside"
#16
Sad 
hi.

is it possible to use the pysqlite library with the xbmc python impementation.

i've fiddeled around some and tried to get it to work with no luck at all, and i think the problem is that it can't load the _sqllite.pyd library, so the question is: can we load external python libraries into xbmc?
Reply
#17
you can't load external dll's (.pyd) yet. i'm busy with that atm.
only problem is that the dll has to be compiled for the xbox, and _sqllite.pyd is probably not.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#18
darkie, i just noticed sometimes when a python script crash, xbmc is totally frozen and so i need to restart the xbox.
is this a known bug?

and what do you think about adding a debug log for python? so it would be easier to know where is the problem when the script crashes the xbox.
Reply
#19
Quote:darkie, i just noticed sometimes when a python script crash, xbmc is totally frozen and so i need to restart the xbox.
is this a known bug?
if python crashes xbmc will crash to, can't do anything about that. but python shouldnt crash at all  :d

Quote:and what do you think about adding a debug log for python? so it would be easier to know where is the problem when the script crashes the xbox.

good idea. will do that.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#20
darkie,
are you planning to modify the windowexample script soon?
as some functions are not documented like :
setnavigation, removecontrol, setfocus for the window object are not very clear for me and the example is the only way to have infos about how to use them...

also, in my script i'm doing a dirty thing : i just add one more controlimage over the previous one to erase the screen in the same class. it uses memory for nothing so and it's too dirty. so how can i do that please?
Reply
#21
Quote:is there or will there be any support for the on screen keyboard so i could add a custom names option to the above code?
no. but i can always have a look at it to add it.

Quote:darkie,
are you planning to modify the windowexample script soon?
as some functions are not documented like :
setnavigation, removecontrol, setfocus for the window object are not very clear for me and the example is the only way to have infos about how to use them...
no don't have it planned Smile . but what still needs to be done is writing better documentation for python (there is none currently).
but since i don't have time at all now, i can't add/create any new code / documentation for python.
maybe someone else is willing to make a start at this?

Quote:also, in my script i'm doing a dirty thing : i just add one more controlimage over the previous one to erase the screen in the same class. it uses memory for nothing so and it's too dirty. so how can i do that please?
you can use removecontrol to remove all the controls.
you can also delete the window and create it again to start with a new clean window.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#22
hi darkie!

would it be possible to include a version number in the future releases? as you added more (nice) features in the latest versions but some scripts don't work anymore. and so with a version number we could alert people their python version is too old to run the script.

thanks

alex
Reply
#23
just a quick reply, playlist support in python is written but i did not have the time yet to test / complete it. this is the first thing i'll do when i have some time left for xbmc

Quote:would it be possible to include a version number in the future releases? as you added more (nice) features in the latest versions but some scripts don't work anymore. and so with a version number we could alert people their python version is too old to run the script.
will do that.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#24
support for xpr would be nice, as default skin as no background image in supported format now Sad that means all the actual scripts with background image don't work anymore...

support for the new virtual keyboard would be wonderful too !

btw darkie, i tried to use the 0-9 keys of the remote but nothing happened... normal behaviour or do am i a bad coder? :d
Reply
#25
(alx5962 @ mar. 11 2004,22:18 Wrote:support for xpr would be nice, as default skin as no background image in supported format now  Sad  that means all the actual scripts with background image don't work anymore...
so far as i can tell xpr images should work fine. can you give me an example script that doesn't work (i'm not a python coder).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#26
Quote:support for xpr would be nice, as default skin as no background image in supported format now    that means all the actual scripts with background image don't work anymore...
you can display files from xpr files, but only if the skin that uses thisxpr is set as the current skin.
to load a picture from such an xpr just use
Quote:xbmcgui.controlimage(0,0,720,576, 'background.png')
and not the full path (need to be fixed in windowexample.py)



Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#27
darkie, you're the man   Image

xml parser is working perfectly and the virtual keyboard too!

i'm so damn happy with all these new tools  Smile

i started to write a xbox python tutorial i will send it to you if u wish

edit : after some tests, it took me at least 30seconds to parse an 80kb xml file! and for the same script it took 2-3 seconds on windows... is this a memory issue?
Reply
#28
Quote:edit : after some tests, it took me at least 30seconds to parse an 80kb xml file! and for the same script it took 2-3 seconds on windows... is this a memory issue
could be a memory issue.
but the biggest problem is that on your windows machine all processor speed is available for the python script
on the xbox the script has to share the processor speed with other threads (for example the gui). it could be set to a higher priority so the script will run faster. but then you could not control your xbox anymore Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#29
darkie, i added some functions to your python lib.
as i have no commit rights in the cvs, can you add my code please?

lib changes

edit : added some more functions
Reply
#30
any chance i could get you guys to add a function to the real xbmcgui library named "emulating" that returns false?

it would make things a whole lot easier with my emulator scripts that i'm making. i know it's a lot to ask to change the main functions just to assist in a little tool like stubbed code, but others developing better emulators or whatever could use the function, too. it would just be a way to see that, this particular instance of the script is running on the legitimate platform (when emulating returns false), or else it's being faked and probably needs extra function calls.

this is all i'd need (written python style, anyway):

Quote:def emulating(self):
    return false

to call it, i'd add to the top of my script:
Quote:emulating = xbmcgui.emulating()
or, that's short enough, i'd probably just check right on the function:
Quote:    if xbmcgui.emulating(): dothis()
just a humble request....
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply

Logout Mark Read Team Forum Stats Members Help
Python Interpreter Development "Python Inside"0