XBMC Community Forum
Python Scripts Development - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: Python Scripts Development (/showthread.php?tid=2045)

Pages: 1 2 3 4 5 6 7 8


- Blackbelt - 2003-10-07 19:17

i noticed that a ported version of python is included in the xbmc source. this is great as python is a simple and powerful object oriented scripting language. so how is python used by xbmc? are scripts used as a part of the application or is the intent only to execute external utility scripts?

the ability to tweak scripts and see the results without recompiling and downloading to the xbox would sure be nice...


- Hullebulle - 2003-10-08 00:51

you can select the scripts like a program or movie and start it. Smile

too bad that i have no idea of python.


- Zealot - 2003-10-08 18:51

i'm really wondering the same thing. i've looked through the forums and docs on the xbmp site, and i couldn't find a definite answer.

does xbmc have a full embedded python interpreter, or is it a limited set of functionality? is there socket support? like, would i be able to build a web service / client in python?


- Hullebulle - 2003-10-08 20:36

Quote:does xbmc have a full embedded python interpreter, or is it a limited set of functionality?
full

Quote:is there socket support?
yes

Quote: like, would i be able to build a web service / client in python?
yes


- burriko - 2003-10-09 12:33

can any of the devs give a bit more info on this? as it sounds very interesting.
how do the scripts interact with xbmc? how exactly do you execute scripts? i tried selecting a small test script in xbmc, but it didn't seem to have any effect.


- windragz - 2003-10-10 21:14

a dream becomes to be a reality!!
yes, yes. i want develop some webservice, so dear python dev implementator tell us anything is possibile about this wonderful part Smile

it's clear that i'm excited? Big Grin


- burriko - 2003-10-15 00:01

(darkie @ oct. 13 2003,15:43 Wrote:currently i am buzy to integrate some xbmc stuff into xbmc, like a yes / no dialog and the progress dialog. for example, you could use the progress dialog when downloading a file from ftp so an user could see how long it takes before it would finish.
sounds good.
i was thinking about writing some python scripts to control a tivo over the network. just simple tasks such as deleting shows, etc. to complement duo's work on streaming video from tivo. i don't think it should be too difficult.
i would need python to be able to display a list of objects (in the same format as it displays a list of videos or mp3s would be great) in xbmc and then wait for the user to select one and pass the selected option on to the script. is that functionality likely to be available to python?


- Gamester17 - 2003-10-15 13:50

(frodo @ oct. 15 2003,07:20 Wrote:things i would like 2 see for python:

1. bind a button control to a script. so pressing a button will run a script
a nice place for one of those buttons would be under the future tv-guide, user could link it to a grab tv listings script


- windragz - 2003-10-16 19:47

frodo, we are on the same page!! [Image: wow.gif]


- burriko - 2003-10-18 20:10

i just tested out a python script in xbmc that i wrote to delete a show from a networked tivo, and it worked great. it should be quite easy to add a lot of extra functionality to xbmc using python.
darkie, how exactly do you use the 4 dialogs that you've added so far? i can't find any example scripts or documentation.

thanks,
burriko.


- darkie - 2003-10-18 20:54

it isn't in cvs yet, still expirimenting a lot with it.
i'll add it to cvs in lets say 2 day's, with some sample scripts.


- burriko - 2003-10-22 01:30

darkie, i've just been playing around with the stuff that you've added to cvs so far. and it's awesome! i already have some of my scripts running on xbmc to control tivo using the list and ok dialogs.
python is going to add so much functionality to xbmc!

btw, i'm sure you know this already, but when any script finishes running it crashes xbmc (this is compiled from anonymous cvs about an hour ago).


- darkie - 2003-10-22 18:03

Quote:btw, i'm sure you know this already, but when any script finishes running it crashes xbmc (this is compiled from anonymous cvs about an hour ago).
uuuh no... didn't know that. xbmc + python are running fine in both debug and relase build on my xbox.
does xbmc crash to when running any of those examples included in cvs?


- burriko - 2003-10-22 18:48

(darkie @ oct. 22 2003,17:03 Wrote:does xbmc crash to when running any of those examples included in cvs?
yes, every script that i've tried freezes up the xbox when it finishes running, including the examples that come with it.

i've just upgraded to the cvs build that has been released today (although i think it's compiled from exactly the same code as the one i compiled last night) and the scripts are still freezing the xbox when they finish running.


- darkie - 2003-10-22 20:30

wel i did fix a bug related to the crashing, but a fix for it is in cvs now for 2 days. maybe anon cvs is very long behind.