raspbian

Pygame flickers only on second run of program

Pygame flickers only on second run of program Question: I have a simple pygame program that I’ve written that I am running on a raspberry pi CM4 using the raspberry pi lite OS (buster). As such I had to install x manually so that pygame would have something to output to. This was done using …

Total answers: 1

Python – Pillow ImageShow.show() isn't displaying images (Raspbian)

Python – Pillow ImageShow.show() isn't displaying images (Raspbian) Question: All I’m trying to do is display an image using Pillow on Raspberry Pi 3 First tried using this code: from PIL import Image from PIL import ImageShow imageA = Image.open(‘Moth.png’) ImageShow.show(imageA) print("Done") It didn’t work, no error code, no nothing, it just skipped the code …

Total answers: 1

Python OverflowError creating date from timestamp in 32bit system

Python OverflowError creating date from timestamp in 32bit system Question: So I am trying to do a simple conversion of a timestamp to date using python builtin datetime module in RaspberryPi4 running Debian Buster. The conversion works fine in my laptop (64bit Debian) but trows a OverflowError in Debian. The 2 examples follow. Anyone knows …

Total answers: 2

Method "DefaultAdapter" with signature "" on interface "org.bluez.Manager" doesn't exist in raspberry pi 3

Method "DefaultAdapter" with signature "" on interface "org.bluez.Manager" doesn't exist in raspberry pi 3 Question: I wanted to use dbus in the raspberry pi with this simple script bus = dbus.SystemBus() obj = bus.get_object(‘org.bluez’, ‘/’) print “object” print obj manager = dbus.Interface(obj,’org.bluez.Manager’) obj = bus.get_object(‘org.bluez’,manager.DefaultAdapter()) print “Manager” print manager print “object” print obj But when …

Total answers: 1

Execute terminal commands in python3

Execute terminal commands in python3 Question: I am on a Raspberry Pi, and I am using a program called fswebcam, which allows you to take pictures with a webcam. ~$ fswebcam image.jpg That command if entered in terminal takes a picture and saves it to your computer, however I want to build a simple python …

Total answers: 1