Python xbmc module
#1
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
Reply
#2
xvalentinex Wrote: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.
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#3
That darn magical C Smile

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.
Reply
#4
xvalentinex Wrote:That darn magical C Smile

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.
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#5
@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
Reply
#6
@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.
Reply
#7
its late and ive had a big day doing stuff and some introductory python coding....

i figured id integrate my script and trigger a simple xbmc.shutdown() command, and then i find that import xbmc only works from internally:-(

has this situation changed as yet?

when i import XBMC or xbmc i get this debug log entry;
File "C:\Python31\StartXBMC.py", line 2, in <module>
import XBMC
ImportError: No module named XBMC

also, i cant seem to find the python directory in xbmc folders?

thanks in advance,
Dam0
Reply
#8
to be able to import xbmc module the script needs to run inside XBMC
Reply
#9
ok, thanks for that

Dam0
Reply
#10
http://www.maskedfox.com/xbmc/old/

XBMC Emulator Scripts
Allows PC development of XBMC scripts (Version 0.5 - August 27, 2004)


http://www.maskedfox.com/xbmc/old/Emulator/Emulator.rar

This contains 2x python scripts "xbmc.py, xbmcgui.py"

They are pretty old, but help with developing python scripts
Reply
#11
Any newer versions of these emulator scripts? Would be nice to have updated versions of xbmc.py, xbmcgui.py and xbmcplugin.py to help with the developing of addons.
Reply

Logout Mark Read Team Forum Stats Members Help
Python xbmc module0