Python Archives | PiCockpit https://picockpit.com/raspberry-pi/category/python/ Sat, 25 Nov 2023 20:40:52 +0000 en-US hourly 1 https://wordpress.org/?v=7.0 https://picockpit.com/raspberry-pi/wp-content/uploads/2024/07/cropped-new-plane-32x32.png Python Archives | PiCockpit https://picockpit.com/raspberry-pi/category/python/ 32 32 Python Dispatch: Making the GIL Optional https://picockpit.com/raspberry-pi/python-dispatch-making-the-gil-optional/ https://picockpit.com/raspberry-pi/python-dispatch-making-the-gil-optional/#respond Tue, 01 Aug 2023 11:35:37 +0000 https://picockpit.com/raspberry-pi/?p=4508 The Steering Council have made a huge announcement regarding the future of Python. Namely, they have decided to make the Global Interpreter Lock (GIL) optional in CPython and eventually remove the GIL altogether. This is a huge decision that will fundamentally alter Python. Therefore, in this post, I’ll go through what the GIL is, its…

The post Python Dispatch: Making the GIL Optional appeared first on PiCockpit.

]]>
https://picockpit.com/raspberry-pi/python-dispatch-making-the-gil-optional/feed/ 0
What’s the difference between CPython, MicroPython, & CircuitPython anyway? https://picockpit.com/raspberry-pi/whats-the-difference-between-micropython-circuitpython-cpython-anyway/ https://picockpit.com/raspberry-pi/whats-the-difference-between-micropython-circuitpython-cpython-anyway/#respond Tue, 18 Jul 2023 09:18:54 +0000 https://picockpit.com/raspberry-pi/?p=4076 CPython, MicroPython, and CircuitPython hold a dear place in the hearts of many a tinkerer. But it’s not always clear what the differences are. And if you’re messing around with microcontrollers for the first time, these distinctions can play a key role in understanding what’s up with your code. So, in this article, I will…

The post What’s the difference between CPython, MicroPython, & CircuitPython anyway? appeared first on PiCockpit.

]]>
https://picockpit.com/raspberry-pi/whats-the-difference-between-micropython-circuitpython-cpython-anyway/feed/ 0
9 Tricks with the Python REPL https://picockpit.com/raspberry-pi/9-tricks-with-the-python-repl/ https://picockpit.com/raspberry-pi/9-tricks-with-the-python-repl/#respond Tue, 11 Jul 2023 12:27:49 +0000 https://picockpit.com/raspberry-pi/?p=4092 Of course, the Pi in Raspberry Pi comes from Python, one of the most popular programming languages in the world and especially popular among tinkerers and makers. In this post, I want to give you 9 tricks and tips with the Python REPL – but don’t worry if you’re not super familiar with Python or…

The post 9 Tricks with the Python REPL appeared first on PiCockpit.

]]>
https://picockpit.com/raspberry-pi/9-tricks-with-the-python-repl/feed/ 0
Which programming language should you use for a Raspberry Pi? https://picockpit.com/raspberry-pi/what-programming-language-should-you-use-with-the-raspberry-pi/ https://picockpit.com/raspberry-pi/what-programming-language-should-you-use-with-the-raspberry-pi/#comments Thu, 13 Oct 2022 18:07:26 +0000 https://picockpit.com/raspberry-pi/?p=3113 If you are new to the Raspberry Pi, you might find yourself at the crossroads of choosing a programming language to learn. There are so many languages out there and what you decide to learn will have a profound effect on what you can do. So, let’s take a look at the languages you can…

The post Which programming language should you use for a Raspberry Pi? appeared first on PiCockpit.

]]>
https://picockpit.com/raspberry-pi/what-programming-language-should-you-use-with-the-raspberry-pi/feed/ 4
CircuitPython, Adafruit Feather RP2040, and I2C https://picockpit.com/raspberry-pi/circuitpython-adafruit-feather-rp2040-and-i2c/ https://picockpit.com/raspberry-pi/circuitpython-adafruit-feather-rp2040-and-i2c/#comments Tue, 23 Nov 2021 19:23:31 +0000 https://picockpit.com/raspberry-pi/?p=1207 As you probably guessed by the title, this article discusses CircuitPython, the Adafruit Feather RP2040, and the I2C communication protocol. The RP2040 has two I2C controllers – good for example, when you want to run two I2C devices with the same I2C address. In my test setup, I have an Adafruit Feather RP2040 microcontroller board,…

The post CircuitPython, Adafruit Feather RP2040, and I2C appeared first on PiCockpit.

]]>
https://picockpit.com/raspberry-pi/circuitpython-adafruit-feather-rp2040-and-i2c/feed/ 3
C extension for MicroPython on Raspberry Pi Pico https://picockpit.com/raspberry-pi/c-extension-for-micropython-on-raspberry-pi-pico/ https://picockpit.com/raspberry-pi/c-extension-for-micropython-on-raspberry-pi-pico/#comments Thu, 08 Apr 2021 14:26:05 +0000 https://picockpit.com/raspberry-pi/?p=774 This is a guide on how to write and run a basic C extension for MicroPython on the Raspberry Pi Pico. I will cover reasons for extending MicroPython, how to write the extension module, how to compile it and how to install it on the Pico. If you want to read more about this topic,…

The post C extension for MicroPython on Raspberry Pi Pico appeared first on PiCockpit.

]]>
https://picockpit.com/raspberry-pi/c-extension-for-micropython-on-raspberry-pi-pico/feed/ 8
Raspberry Pi Pico and MicroPython on Windows https://picockpit.com/raspberry-pi/raspberry-pi-pico-and-micropython-on-windows/ https://picockpit.com/raspberry-pi/raspberry-pi-pico-and-micropython-on-windows/#comments Sat, 30 Jan 2021 15:11:05 +0000 https://picockpit.com/raspberry-pi/?p=623 This article answers the question: How do I use the Raspberry Pi Pico with MicroPython on Windows? We also show how to install the right driver for “Board CDC” (which the Pico will show up as once MicroPython is installed) on Windows 8.1. (We will also discuss the differences between MicroPython and CircuitPython where applicable…

The post Raspberry Pi Pico and MicroPython on Windows appeared first on PiCockpit.

]]>
https://picockpit.com/raspberry-pi/raspberry-pi-pico-and-micropython-on-windows/feed/ 10