PDA

View Full Version : System calls on Boxee Dlink Box



andrew2011
February 24th, 2011, 01:25 AM
I'm creating an application on my Boxee Dlink box written in python and which uses os.system to call out to the system.

This works on the latest beta for Mac OSX. However, on the Dlink box I just get an error code.

It applies to all the system related calls, e.g. the following doesn't work either:


myOutput=subprocess.Popen([r"echo"], stdout=subprocess.PIPE).communicate()[0]



In the above example I just get the following exception thrown:
[Errno 10] no child processes

I am quite disappointed in how difficult it is to develop for the Boxee box. I thought it would be much more of an open platform where I could get on the box and debug on the platform itself. Python is notoriously difficult to debug (as is any interpreted language) and developers need all the help they can get to debug and run their code on the target platform.

Why does the code behave differently on Mac and Dlink boxes? This is fundamentally wrong. Developers should not have to write the code specifically to cater for specifics of the underlying platform. The Boxee api should provide a platform independent API and abstract away all the specifics.

If this is a case of Boxee Dlink boxes locking down system calls then I would like to know how to boot the box into developer mode in order to use the box in the way I want. I paid a hefty sum of money for the box and I expect to be able to use it for my own purposes.

viljoviitanen
February 24th, 2011, 04:33 AM
If this is a case of Boxee Dlink boxes locking down system calls then I would like to know how to boot the box into developer mode in order to use the box in the way I want. I paid a hefty sum of money for the box and I expect to be able to use it for my own purposes.

Sorry, you lose. For now the dlink boxee box is locked in tight. You can enable the box so that you don't need app signatures for local apps on an usb stick for testing, but that's it.

Also, calling out to system is a no-no anyway, stick to the documented apis.

Boxee is available on 3 pc platforms (windows,mac,linux) and the dlink box (which really is a linux system, but different from desktop linux pc's), and in future other boxee enabled devices (iomega nas, viewsonic tv's...)

The api has its limitations and bugs of course, but for now just need to deal with them. (Or start developing on another platform.)

bartsidee
February 24th, 2011, 06:33 AM
They have prevent certain python commands to secure the boxee box from hacking. They have to do it to get the contracts with the big content providers. Most of the python code just works fine, but do not try to modify system sources or execute non python code/scripts etc. In general terms I had no problems with the python os module (reading files etc).

If you want to execute a python script, please use the import module construct, with objects/threads instead of separate code execution.