Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 23 |
Nodes: | 6 (0 / 6) |
Uptime: | 54:44:55 |
Calls: | 583 |
Files: | 1,139 |
D/L today: |
179 files (27,921K bytes) |
Messages: | 111,801 |
I have upgraded my Pi 4B from bookworm to trixie and, while most
things work fine, my gpiod code in Python is completely broken. Can
anyone confirm that everything has changed a lot or am I going mad?
I have upgraded my Pi 4B from bookworm to trixie and, while most
things work fine, my gpiod code in Python is completely broken. Can
anyone confirm that everything has changed a lot or am I going mad?
In article <qd56ol-6mhl.ln1@q957.zbmc.eu>, Chris Green <cl@isbd.net> wrote:
I have upgraded my Pi 4B from bookworm to trixie and, while most
things work fine, my gpiod code in Python is completely broken. Can
anyone confirm that everything has changed a lot or am I going mad?
I noticed that when I tried updating a RPi 4 + Geekworm X728 system yesterday. The scripts that talk to the X728 (using rpi-lgpio instead of rpi-gpio) were completely broken. I'm trying to rework them to use
gpiozero, hoping that it might be a better-supported system for the long term.
On 28/08/2025 17:34, Scott Alfter wrote:
In article <qd56ol-6mhl.ln1@q957.zbmc.eu>, Chris Green <cl@isbd.net> wrote:
I have upgraded my Pi 4B from bookworm to trixie and, while most
things work fine, my gpiod code in Python is completely broken. Can
anyone confirm that everything has changed a lot or am I going mad?
I noticed that when I tried updating a RPi 4 + Geekworm X728 system yesterday. The scripts that talk to the X728 (using rpi-lgpio instead of rpi-gpio) were completely broken. I'm trying to rework them to use gpiozero, hoping that it might be a better-supported system for the long term.
It's probably some rearrangement of the /sys hierarchy.
At some level the C library gpio functions should still work...
The Natural Philosopher <tnp@invalid.invalid> wrote:
On 28/08/2025 17:34, Scott Alfter wrote:OP here, yes, I'm not going mad. There are major changes between the
In article <qd56ol-6mhl.ln1@q957.zbmc.eu>, Chris Green <cl@isbd.net> wrote:It's probably some rearrangement of the /sys hierarchy.
I have upgraded my Pi 4B from bookworm to trixie and, while most
things work fine, my gpiod code in Python is completely broken. Can
anyone confirm that everything has changed a lot or am I going mad?
I noticed that when I tried updating a RPi 4 + Geekworm X728 system
yesterday. The scripts that talk to the X728 (using rpi-lgpio instead of >>> rpi-gpio) were completely broken. I'm trying to rework them to use
gpiozero, hoping that it might be a better-supported system for the long >>> term.
At some level the C library gpio functions should still work...
i.6.x and 2.x versions of python3-libgpiod. The trouble is that
finding out about it all is very difficult because there are so many different python wrappers for gpiod and this makes searching very frustrating.
The best I've found so far is the 'source':-
https://github.com/brgl/libgpiod/blob/master/bindings/python/README.md
It has some Python examples but the coding style is very odd and makes
it difficult to follow what's going on IMHO.
On 28/08/2025 17:34, Scott Alfter wrote:
In article <qd56ol-6mhl.ln1@q957.zbmc.eu>, Chris Green <cl@isbd.net> wrote: >>> I have upgraded my Pi 4B from bookworm to trixie and, while mostIt's probably some rearrangement of the /sys hierarchy.
things work fine, my gpiod code in Python is completely broken. Can
anyone confirm that everything has changed a lot or am I going mad?
I noticed that when I tried updating a RPi 4 + Geekworm X728 system
yesterday. The scripts that talk to the X728 (using rpi-lgpio instead of
rpi-gpio) were completely broken. I'm trying to rework them to use
gpiozero, hoping that it might be a better-supported system for the long
term.
The best I've found so far is the 'source':-
https://github.com/brgl/libgpiod/blob/master/bindings/python/README.md
It has some Python examples but the coding style is very odd and
makes it difficult to follow what's going on IMHO.
On Thu, 28 Aug 2025 19:05:55 +0100, Chris Green wrote:
The best I've found so far is the 'source':-
https://github.com/brgl/libgpiod/blob/master/bindings/python/README.md
It has some Python examples but the coding style is very odd and
makes it difficult to follow what's going on IMHO.
I had a look at one or two examples, but they didnrCOt look very rCLoddrCY
to me. Any particular ones you are having trouble with?
Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
On Thu, 28 Aug 2025 19:05:55 +0100, Chris Green wrote:
The best I've found so far is the 'source':-
https://github.com/brgl/libgpiod/blob/master/bindings/python/README.md >>>
It has some Python examples but the coding style is very odd and
makes it difficult to follow what's going on IMHO.
I had a look at one or two examples, but they didnrCOt look very rCLoddrCY >> to me. Any particular ones you are having trouble with?
I worked it all out OK, I do write quite a lot of Python code. My
comment was rather that the style using 'with' and so on which makes
it rather diffcult to actually follow the sequence of calls required
to do simple things like 'set this line high' or 'read the state of
that line'.
Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
On Thu, 28 Aug 2025 19:05:55 +0100, Chris Green wrote:
The best I've found so far is the 'source':-
https://github.com/brgl/libgpiod/blob/master/bindings/python/README.md >>>
It has some Python examples but the coding style is very odd and
makes it difficult to follow what's going on IMHO.
I had a look at one or two examples, but they didnrCOt look very
rCLoddrCY to me. Any particular ones you are having trouble with?
I worked it all out OK, I do write quite a lot of Python code. My
comment was rather that the style using 'with' and so on which makes
it rather diffcult to actually follow the sequence of calls required
to do simple things like 'set this line high' or 'read the state of
that line'.
On Sat, 30 Aug 2025 09:02:46 +0100, Chris Green wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
On Thu, 28 Aug 2025 19:05:55 +0100, Chris Green wrote:
The best I've found so far is the 'source':-
https://github.com/brgl/libgpiod/blob/master/bindings/python/README.md
It has some Python examples but the coding style is very odd and
makes it difficult to follow what's going on IMHO.
I had a look at one or two examples, but they didnrCOt look very
rCLoddrCY to me. Any particular ones you are having trouble with?
I worked it all out OK, I do write quite a lot of Python code. My
comment was rather that the style using 'with' and so on which makes
it rather diffcult to actually follow the sequence of calls required
to do simple things like 'set this line high' or 'read the state of
that line'.
You donrCOt know about context managers? TheyrCOre a basic Python
mechanism for ensuring proper cleanup. You consider it rCLoddrCY just
because you hadnrCOt learned about that feature of Python?
Yes, context managers are a 'good thing' but using them to help **understand** how the basics of a package work is not, IMHO, a good
idea.
First show how to do something **then** emphasise that you
must release resources and say that using a context manager is one
way of doing it.
Someone unfamiliar with Python and/or someone who is not an
experienced programmer is much more likely to be the audience for
these examples.
The more professional/skilful people will probably simply dive in to the
API documentation.