Go to advanced search

by Elmit
Mon Oct 07, 2019 1:43 am
Forum: Beginners
Topic: How to distinguish that the python program is executed on a RPI?
Replies: 7
Views: 757

Re: How to distinguish that the python program is executed on a RPI?

Andyroo wrote:
Sat Oct 05, 2019 5:00 pm
You could look at /sys/firmware/devicetree/base/model to see what you are running on but how you would then dynamically select the include modules I have no idea...
that fails on Ubuntu. No such file!
by Elmit
Fri Oct 04, 2019 11:50 pm
Forum: Beginners
Topic: How to distinguish that the python program is executed on a RPI?
Replies: 7
Views: 757

How to distinguish that the python program is executed on a RPI?

I am developing Python scripts on different machines, including RPI. Is there a way to distinguish on which machine I am working, so that I load the right modules? E.g. PySimpleGUI uses this: #!/usr/bin/env python import sys if sys.version_info[0] >= 3: import PySimpleGUI as sg else: import PySimple...
by Elmit
Thu Jul 25, 2019 6:04 am
Forum: Troubleshooting
Topic: Autossh in rc.local not working
Replies: 1
Views: 333

Autossh in rc.local not working

I try to add a line to rc.local to start autossh, something similar to: autostart -M 10999 -i /home/pi/.ssh/id_rsa -R 7654:localhost:22 user@example.com This command used to work with Raspbian 9, but not anymore with Raspbian from 2019-07-10. If I login and type in a terminal: sudo /etc/rc.local It ...

Go to advanced search