PDA

View Full Version : Python xbmc module


xvalentinex
2009-09-22, 18:15
Hello,

I'm writing a simple gui program to remotely control XBMC. On the http api article in the wiki, it suggests an 'import xbmc', which looks like it would give clean methods for communicating with the api, as opposed to having to write my own with curl, etc.

The problem, is that I cannot find this xbmc module. I'm not the greatest coder, but it seems to be "magically" imported by plugins/scripts, without actually being a .py/.so file in the file hiearchy. Is there any way I can download this module to include in a remote program? Or perhaps, someone could shed some light on how/where plugins and scripts are importing xbmc?

Thanks

rwparris2
2009-09-22, 18:22
Or perhaps, someone could shed some light on how/where plugins and scripts are importing xbmc?

It's c (aka, magic). You can't import it externally, only from within xbmc.

xvalentinex
2009-09-22, 18:32
That darn magical C :)

Fair enough, thanks for the input, I'll just write my own classes.

If anyone knows, or has written a class for communicating with xbmc's http api, I would love to know about it.

rwparris2
2009-09-22, 20:10
That darn magical C :)

Fair enough, thanks for the input, I'll just write my own classes.

If anyone knows, or has written a class for communicating with xbmc's http api, I would love to know about it.
Please publish it if you do.

Dan Dare
2009-09-23, 01:46
@xvalentinex
Here's a list of HTTP API commands.
http://www.xbmc.org/wiki/?title=WebServerHTTP-API

They are fairly easy to implement, I wrote a C# app to control XBMC, it's fairly simple and not finished, I might publish the sources as well.
http://dandar3.blogspot.com/2008/04/xbmc-remote.html

xvalentinex
2009-09-25, 18:11
@rwparris2: will do

I've got the base system using urllib and sgmllib. I'm just playing with the library sql commands to find a comprehensive dataset that makes sense.