• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 10
Python Inside
#31
(cyberplague @ nov. 07 2003,22:23 Wrote:are there any links to documentation on how to use python with xbmc?

i am looking to write some code in python to connect to my replaytv and delete and possibly stream shows straight from the replay.

thanks,

cp
this thread details how to get python running if you read back far enough. you then goto settings->scripts and select the script you want to run. afaik, it's pretty much a full implementation of python, though interaction with xbmc is limited at the moment (a few dialogs). i've read of people connecting to devices using ip like you mention, i'm not sure if you would be able to stream though, that would depend on xbmc supporting the streaming protocol, which may or may not be a problem.
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
#32
for xbmc there is no documentation atm. but since writing python code for windows is the same as writing it on the xbox you should be able to find most information at python.org

for xbmc specific functions you can take a look at the examples which are in cvs\scripts\

problem for now is that there isn't any error output to xbmc, so you can't see if the script runs ok or 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
#33
cyberplague, it's very easy to see how to use the xbmc specific stuff if you take a look at darkie's example scripts.

here's the current version of my tivo scripts if anyone is interested.
tivocontrol.zip
keep in mind that this script has only been tested on my tivo so far. i'd be interested to hear from anyone who tries it.
#34
doh! i will check out python.org. as well as the scripts.

thanks for the tivoscripts. my mother-in-law has a tivo, so i will test it with hers and let you know the outcome.

darkie: couldn't in the scripts we code an error catching routine, that could use the dialogs to output any errors or something to let us know the script ran fine?

thanks again guys. tomorrow i will start my testing...

cp
#35
i found a pretty good python remote debugger at http://www.activestate.com/ , seems to work well with xbmc.
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
#36
to cyberplague:, the error catching is already there. only need to be written to a dialog (which isn't a big deal, just didn't had the time yet)
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
#37
darkie - awesome. i figured it was not active cause of time issues. any idea when it could be done? i don't need a specific date, just if it is going to be days, weeks or months before it gets written to a dialog. it would really help with python script development. which you already know.

keep up the great work. i wouldn't mind writing some documentation for the python side of things. let me know.

cp
#38
darkie, is it possible to write a page of text to the screen? kind of like the script output screen i suppose.
btw, i did a dir(xbmc) to check what's available from importing xbmc, obviously dialog and dialogprogress are used in your example scripts so i can see what we can do with them, but what about window and ouput?

thanks for any info you can give.
burriko
#39
what i am busy with is to make it possible to create your own windows (add text / images / buttons and more) and display it, but this isn't finished yet.

xbmc.window as it is now in cvs is just an expiriment and doesn't do anything at all.
if you want to write to to screen you could use xbmc.output or sys.stdout for now
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
#40
cool, thanks for the info. what you described sounds great, i look forward to seeing what develops.
#41
Exclamation 
too bad xbmc does not yet have xbmp's tv-guide or the fruits of the python xmltv tv_grab project would be usefull Image
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.
#42
sure, python in xbmc has a lot of potential in plugin development and that would be great to be able to auto update tv listings through python.
can't wait to see this Image
#43
Thumbs Up 
i just wanted to give a big *thank you* to the xbmc developers for putting python support into xbmc, it's truly awesome. there are a *lot* of neat things that can be done with this, and it's about time that we had an easy user-level scripting language to use for doing cool things on the xbox. i'm really looking forward to what can be done with this in the future.

in particular, i've written a basic irc bot that comes onto irc (by utilizing the sockets support in python) and can be controlled into doing some very basic things (i.e. playing a particular song/movie, etc.) it works surprisingly well. in the future i plan on writing in dcc support so that the bot can receive/send files to/from xbmc (the idea being, the bot will be able to say "now playing: song x, to download, type /ctcp mybot blah".) although i know that xbmc is alpha software for now, i have a couple of suggestions. i'm sure you guys have thought of some of these already, but without further ado:

* the ability to auto-execute scripts upon loading would be a major plus, that way my irc bot would always re-join automatically.
* several functions that would allow us to see what media is being played (and its name, size, length, how much its played so far, etc) would be very useful. also, some kind of traversal functions would be good (i.e. "tell me all of the mp3 files available on my smb share in a certain directory) subsequently, being able to query information about that file (i.e. "return the id3 tags for file x") would be useful.

beyond that, *thanks* for doing a great job, and i see that filezilla support was finally added into the cvs tree, so maybe now i'll be able to use xbmc as a dashboard replacement. Smile i look forward to seeing what else will come of xbmc.

--cyan
#44
Quote:maybe now i'll be able to use xbmc as a dashboard replacement.

too bad xbmc it isn't usable as dashboard replacement 'till now.
it's very promising (it will also allow to set xbox settings like date and time, video format, savegames, and so on).

a killer app. keep on the amazing work and thank you
#45
ok, python has the option now to create windows where text and images can be drawn on.
i've just added a small example to the cvs tree so people can have a look at it.

note, it is impossible to close a window at this time with your controller or remote. will be fixed soon.
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
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 10

Logout Mark Read Team Forum Stats Members Help
Python Inside0