How can you:
- Print debugging messages from a Python script?
- Access those messages in real-time on a remote device (Arduino Yun) you're SSH'ed into?
So far, I've been making changes, copying them to the Yun, restarting it, and doing all this without the benefit of debugging. (I have to test on the Yun itself.)
In a Python script, you can give yourself messages like this:
print("var x = {0}; y = {1}".format(x, y))
Run
python path/to/file.py
(while SSH'ed) to access the server w/real-time logs.If the server is already running, you can do
ps | grep python
thenkill XXXX
for the running process, then run the above instruction again.