Python

secure command execution with Python: subprocess.Popen

Security is important for me while developing the picockpit-client. The following applies to Linux systems (but probably is applicable to all Unix like systems, including macOS)Python allows to run external commands using the subprocess module.import subprocessIn the upcoming version of PiCockpit, users will be able to create their own buttons (simply editing a JSON file [...]

By | Mai 15th, 2020|Development, Python|Kommentare deaktiviert für secure command execution with Python: subprocess.Popen

TermiShell: a web-based shell for the Raspberry Pi (development notes)

IntroductionIn the course of development of PiCockpit, I am going to add a web-based Terminal called TermiShell.TermiShell icon, by: Stephanie Harvey via unsplash.com TermiShell is going to allow you to log into your Raspberry Pi using PiCockpit.com (and the picockpit-client) – no additional application required on either side. This should be very comfortable, especially when [...]

By | Mai 5th, 2020|Development, Python, Raspberry Pi Blog, Raspberry Pi Embedded Development|Kommentare deaktiviert für TermiShell: a web-based shell for the Raspberry Pi (development notes)

Python Paho MQTT client self-signed certificates websockets, howto

Using Paho in Python with websockets and self-signed certificates for a https:// websocket connection has a couple of pitfalls, so I’m addressing this with some sample code here:import ssl import time import paho.mqtt.client as mqtt class PCPMQTTClient:     def on_connect(self, client, userdata, flags, rc):         self.connection_status = rc         if rc == 0:             self.connected_flag = True             self.connection_error_flag = [...]

By | Mai 19th, 2019|Development, Python|Kommentare deaktiviert für Python Paho MQTT client self-signed certificates websockets, howto