right now there is no IDE support for Python.
On PyDev: You might be able to get syntax checking to work (although in the current Eclipse IDE pretty much all python is removed - so you would have to add the required python packages). However, as far as I can see PyDev doesn't support remote execution. I.E. in order to test your code you'd have to execute & test your program outside the PyDev window containing your code.
Thanks, that's what I suspected.
I was thinking last night that I could trick Eclipse to copy over and run my python script rather than the compiled C or C++ binary. After a couple of minutes this morning I've got a pretty clean project setup with my python code in the src folder of the host C project and two run configurations called "hello_gpio (local)" and "hello_gpio (remote)". The local one is using PyDev and the remote one is "parasitizing" on the SSH connection for the C app (I'm using the 1_c_helloword project). I had to create a wrapper module called mraa.py that implements some proxy code to avoid local errors.
For the remote connection all I did was change the "C/C++ Application" field in the run configuration dialog to: src/hello_gpio.py and the "Remote Absolute File Path for C/C++ Application:" to: /home/root/hellop_gpio.py (no need to run chmod 755 before executing, so leave the "Commands to execute before application" empty).
Is there a simple way to compile and use the actual mraa_master project for Python on your Laptop? (I'm using a MacbookPro)
Meanwhile here's the minimal version of the mraa proxy, just enough to run the hello_gpio.py example from the GitHub mraa project:
# Proxy API module for running python scripts outside of Edison
# gpio_dir_t enums
DIR_OUT = 0
DIR_IN = 1
# mraa_result_t enums
MRAA_SUCCESS = 0
# Dummy class to avoid errors when running mraa enabled scipts on your laptop
def __init__(self, pin, owner=True, raw=False):
self.m_gpio = None
def dir(self, dir):
def write(self, value):