0xDECAFBAD

It's all spinning wheels and self-doubt until the first pot of coffee.

IPython as networked command shell on XBMC?

Just in case it's already been done, or I don't get around do doing it, hear me oh LazyWeb:

I want to cobble together a version of IPython (or at least an InteractiveConsole) that runs on a network socket for access via telnet. I then intend to upload this to my XBMC-equipped Xbox and run it as a command shell there for access from my LAN. It seems like an idea that should work, since XBMC packs a Python install.

Archived Comments

  • I don't have such a toy to play with but I'm wondering why the question wasn't asked, and answered, with ssh+screen?

  • @Mike: Because XBMC doesn't run ssh+screen, only a Python interpreter embedded in an entertainment center media dashboard. (ie. Not an OS like Linux)

  • when you say 'like telnet' you mean just opening up port 23 and listening on it and executing said instructions? I don't know Python (though coincidentally I had to debug some 2-3yo python today; that was interesting), but I presume it makes it not-so-hard to open server sockets and listener sockets, and then execute the dynamic code in a readloop... but then I don't know XBMC beyond the above link you posted, so this is probably just all optimistic hot air. ;)

  • @kaolin: Oh, yeah, I think it would / will be about as easy as that. I've just been too busy or lazy to have done it yet, and hoped that someone somewhere had already done something whizbangy with a Python shell-on-a-socket. :)

  • Perhaps PYRO (Python Remote Objects) is a choice, I might give it a try on weekend (on my xbox of course). Though I cannot imagine any real use so far.

  • twisted.conch lets you hook up a python interpreter to a telnet or ssh server (which are implemented in Python, of course).

  • Hmm, it's been a year or so since last I tinkered with Twisted... It's tempting, since I remember all the nifty toys I played with in that environment-- and an Xbox with XBMC is just the place for it, since it doesn't have a shell or much OS infrastructure. Though, I was kinda looking for something that used the core Python modules so I didn't have to plunk down a lot of code on the HD.

    On the other hand... Twisted could let me do a lot of things on that little box without installing Linux.

  • What about looking at Nokia's Python btconsole. I run the python script on my phone, and then open a screen to the /dev/tty.NokiaBTSocket and am presented with a console on the phone itself.

    I imagine you could grab the btconsole.py or simplebtconsole.py and set it up on XBMC. Depends on what modules are available.

    I'm running a REALLY old version of XBMP (predecessor/sibling to XMBC) and have happily been running Xebian and MythTV frontend. However, recently came across the MythTV front-end with XMBC as well as all these new features so will upgrading it myself. However, the fiance' doesn't much like me messing with her "Tivo".