Discussion:
new here
(too old to reply)
Daniel
2024-08-20 22:26:39 UTC
Permalink
Hi folks -

New here. I've perused some posts and haven't seen a posting FAQ for
this NG. I'm learning python right now to realize some hobby goals I
have regarding some smolnet services. What are the NG standards on
pasting code in messages? Do yall prefer I post a pastebin link if it's
over a certain number of lines? I know this isn't IRC - just asking.

Daniel
MRAB
2024-08-20 23:12:00 UTC
Permalink
Post by Daniel
Hi folks -
New here. I've perused some posts and haven't seen a posting FAQ for
this NG. I'm learning python right now to realize some hobby goals I
have regarding some smolnet services. What are the NG standards on
pasting code in messages? Do yall prefer I post a pastebin link if it's
over a certain number of lines? I know this isn't IRC - just asking.
You'll find it rather quiet here because most activity has moved to here:

https://discuss.python.org/
Stefan Ram
2024-08-21 00:30:16 UTC
Permalink
So, what's the deal? Why're you still trippin' on Usenet?
To smoke out the last few Newbies? Why don't you just
bounce back to your janky website and call it wrapped?
Stefan Ram
2024-08-21 00:22:35 UTC
Permalink
Post by Daniel
Do yall prefer I post a pastebin link if it's
over a certain number of lines?
So, I'm not down with that kind of media mismatch!
When an OP expects me to scope out some rando website,
I'm fixin' to ghost them.

If your source code's a total drag, you oughta cook up
a minimal working example. That'll juice your chances of
snagging some gnarly answers . . .
rbowman
2024-08-21 01:14:34 UTC
Permalink
Post by Daniel
New here. I've perused some posts and haven't seen a posting FAQ for
this NG. I'm learning python right now to realize some hobby goals I
have regarding some smolnet services. What are the NG standards on
pasting code in messages? Do yall prefer I post a pastebin link if it's
over a certain number of lines? I know this isn't IRC - just asking.
<snark>
Standards? This is usenet, the last remaining wild west. Good news: c.l.p
isn't overrun by trolls. Bad news: c.l.p doesn't seem to be overrun by
much of anybody.
</snark>

smolnet, as in things like

https://small-tech.org/

Python certainly has the tools. You can even construct a web server on a
Raspberry Pi Pico but I don't know any specifics about smolnet. The
subreddit seems dead and I don't see anything but a few obscure github
references.
Daniel
2024-08-21 21:15:37 UTC
Permalink
Post by rbowman
Post by Daniel
New here. I've perused some posts and haven't seen a posting FAQ for
this NG. I'm learning python right now to realize some hobby goals I
have regarding some smolnet services. What are the NG standards on
pasting code in messages? Do yall prefer I post a pastebin link if it's
over a certain number of lines? I know this isn't IRC - just asking.
<snark>
Standards? This is usenet, the last remaining wild west. Good news: c.l.p
isn't overrun by trolls. Bad news: c.l.p doesn't seem to be overrun by
much of anybody.
</snark>
I'm not worried much about large populations. i've been on massive
forums and had less results than I did with an IRC channel with four
users.
Post by rbowman
smolnet, as in things like
Lesser used protocols not known by many in the mainstream. Such as:

gopher, gemini, finger, spartan, titan, etc.

An example of use, here's a weather service tied to a finger. Put your
city name as the user. This isn't mine, but it is inspiring. Example:

finger ***@graph.no

For all options, go to the help finger:

finger ***@graph.no

Daniel
dn
2024-08-22 01:43:59 UTC
Permalink
...
Post by Daniel
Post by rbowman
smolnet, as in things like
gopher, gemini, finger, spartan, titan, etc.
An example of use, here's a weather service tied to a finger. Put your
The OpSys on this machine no longer features finger (available for
installation as an 'extra').

For Miami weather using a stock-standard web-browser, try:
https://www.yr.no/en/content/2-4164138/meteogram.svg
--
Regards,
=dn
rbowman
2024-08-22 04:25:17 UTC
Permalink
Post by dn
The OpSys on this machine no longer features finger (available for
installation as an 'extra').
My Ubuntu 22.04 box has it, the Fedora 40 one doesn't. Ubuntu offers to
install gopher, Fedora doesn't. Go figure.
Gilmeh Serda
2024-08-22 19:47:42 UTC
Permalink
Post by rbowman
stall gopher, Fedora doesn't. Go figure.
"Use the sauce, Luke."

Arch has it in the AUR.

Built on these:
https://github.com/gophernicus/gophernicus (daemon)
https://gopherus.sourceforge.net/ (client)
--
Gilmeh

...his disciples lead him in; he just does the rest. -- The Who, "Tommy"
Jason Friedman
2024-08-22 02:06:33 UTC
Permalink
On Wed, Aug 21, 2024 at 4:04 PM Daniel via Python-list <
Post by Daniel
An example of use, here's a weather service tied to a finger. Put your
Quite cool!
Daniel
2024-08-22 08:15:29 UTC
Permalink
Post by Jason Friedman
On Wed, Aug 21, 2024 at 4:04 PM Daniel via Python-list <
Post by Daniel
An example of use, here's a weather service tied to a finger. Put your
Quite cool!
Right? It's so quick too. Just thinking how broad you can make it -
accessing live data on the internet without the need of a broadband
connection.

If you want to check out the fingerverse

finger ***@happynetbox.com

If you remember webrings, there's a finger ring, though there aren't
alot of fingers registered on there yet.

finger ***@thebackupbox.net

Daniel
rbowman
2024-08-22 04:18:14 UTC
Permalink
Post by Daniel
gopher, gemini, finger, spartan, titan, etc.
An example of use, here's a weather service tied to a finger. Put your
Thanks. Interesting. I was surprised a Norwegian site would have data for
a small city in the US. I have a Python script that accesses the NOAA
(National Oceanic and Atmospheric Administration) API and the data in the
Meteogram appears to match well. fwiw, all that does is

observation_url = f"https://api.weather.gov/stations/K{grid_id}/
observations/latest"
response = requests.get(observation_url).json()

using the Python 'requests' package and then parsing out the JSON.
Implementing finger probably would be a straight socket connection. I
don't know how useful this is:

https://pypi.org/project/pyfinger/

I assume gopher is fron the archie, veronica, and jughead days. It appears
straightforward.

https://datatracker.ietf.org/doc/html/rfc1436

It's another use of a simple socket connection.

https://docs.python.org/3/howto/sockets.html

You may be able to gleam something from

https://sr.ht/~lioploum/offpunk/
Daniel
2024-08-22 08:10:00 UTC
Permalink
Post by rbowman
Post by Daniel
gopher, gemini, finger, spartan, titan, etc.
An example of use, here's a weather service tied to a finger. Put your
Thanks. Interesting. I was surprised a Norwegian site would have data for
a small city in the US. I have a Python script that accesses the NOAA
(National Oceanic and Atmospheric Administration) API and the data in the
Meteogram appears to match well. fwiw, all that does is
observation_url = f"https://api.weather.gov/stations/K{grid_id}/
observations/latest"
response = requests.get(observation_url).json()
I think he uses a weather service API to call the data, and I'm sure
they all share data across other national weather services. That's just
a guess.
Post by rbowman
using the Python 'requests' package and then parsing out the JSON.
Implementing finger probably would be a straight socket connection. I
https://pypi.org/project/pyfinger/
I assume gopher is fron the archie, veronica, and jughead days. It appears
straightforward.
I use gopher all the time, and the lynx browser supports it directly.

If you have lynx, you can visit this gopher interface to Wikipedia:

gopher://gopherpedia.com

If you like Reddit, there's this

gopher://gopherddit.com

Of course it's read only, but if you're wishing to leisurely read posts
on reddit in a super fast gopher page, you can.

Right now, I'm focused on providing wiktionary.org services on gopher as
well as finger.

These are longterm projects since I can only learn python and code on
spare time, which I have little.

/snip

I will be posting my coding questions in here.

Thanks guys.

Daniel
rbowman
2024-08-22 20:15:56 UTC
Permalink
Post by Daniel
gopher://gopherpedia.com
Yeah, that works and I could find Hillbilly Elegy (film). The text was
fine but the 'Accolades' table was garbled. It came up on the Netflix
recommendations and I watched it last night so when it said 'Search' I
wanted to see what it would do. It came back with links to the book, the
film, the Vances, and cast member bios. It's a subset of the Wiki 'Search
in..' but still impressive.

Python certainly will get the job done either on the client or server
side. Being retro tech should make life easier than some of the web
services frameworks.
Paul Rubin
2024-08-22 17:40:52 UTC
Permalink
smolnet, as in things like https://small-tech.org/
Hey thanks for that link. The concept is interesting though idk about
the code. A little too much Javascript for "small tech", heh.
Python certainly has the tools. You can even construct a web server on a
Raspberry Pi Pico but I don't know any specifics about smolnet.
The Pico uses MicroPython which is stuck on an old version of Python,
unfortunately.
rbowman
2024-08-22 19:49:21 UTC
Permalink
Post by Paul Rubin
The Pico uses MicroPython which is stuck on an old version of Python,
unfortunately.
I think it's up to 3.4 in general and erratic past that. It doesn't have
the match from 3.10. I don't think it has f-strings though it may have
the walrus. There are workarounds but it can be annoying.

I haven't worked with CircuitPython lately and don't know if it has pulled
in later features.
dn
2024-08-22 20:36:02 UTC
Permalink
Post by rbowman
Post by Paul Rubin
The Pico uses MicroPython which is stuck on an old version of Python,
unfortunately.
How did this enter the conversation/thread?

Paul's 'contribution' does not even appear on the Archive...
Post by rbowman
I think it's up to 3.4 in general and erratic past that. It doesn't have
the match from 3.10. I don't think it has f-strings though it may have
the walrus. There are workarounds but it can be annoying.
Two points:

- it's cut-down to work on bare-metal which makes for low demands on
resources, but commensurate shortage of the facilities we CPython
developers take for-granted (ie may allow ourselves to find annoying)

- it has f-strings, but frustrates those of us who prefer F-strings

- the docs point-out that (compared with full-fat Python) it is less
consistent across environments. Accordingly, worth reading the "Quick
Reference for [your processor]" sections of the docs, eg R-Pi Pico
version only has half of the ADC-methods.


Once scale expectations to take into account the power of the processor,
MicroPython goes-like-the-clappers!
Post by rbowman
I haven't worked with CircuitPython lately and don't know if it has pulled
in later features.
Have you (gentle reader) used both and feel able to offer a comparison -
when to prefer one over the other?



[https://www.phrases.org.uk/meanings/like-the-clappers.html]
--
Regards,
=dn
Paul Rubin
2024-08-23 02:56:54 UTC
Permalink
Post by dn
- it's cut-down to work on bare-metal which makes for low demands on
resources, but commensurate shortage of the facilities we CPython
developers take for-granted (ie may allow ourselves to find annoying)
Later versions of Python (the language) aren't particularly more
demanding. MicroPython is just out of date in that regard. The high
consumption stuff in CPython is mostly in the libraries.
Post by dn
MicroPython vs CircuitPython
Have you (gentle reader) used both and feel able to offer a comparison
- when to prefer one over the other?
CircuitPython is supposed to be more beginner-friendly and more
consistent across hardware. It also supports some hardware devices that
MicroPython doesn't. I don't know how difficult it would be to port
those drivers if there was occasion to. MicroPython has more "export"
user options, including being able to compile in more language features
like bignum arithmetic. I think CircuitPython integers are limited to
32 bits.

Also, CircuitPython (maybe as part of its beginner friendliness)
supports the USB mass storagei interface out of the box. So you can buy
an Adafruit board with CircuitPython already on it, plug it into a USB
port, and have it auto-mount as a FAT32 file system to which you can
drag and drop files from your PC. With MicroPython on the Pico, you use
some command line utility to transfer files instead, but it is no big
deal.
rbowman
2024-08-23 05:38:22 UTC
Permalink
With MicroPython on the Pico, you use some command line utility to
transfer files instead, but it is no big deal.
Loading the UF2 is easy.

https://www.raspberrypi.com/documentation/microcontrollers/
micropython.html

I use VS Code with the MicroPython extension so when the board is plugged
in it shows up as ttyACM0 or COM something I think on Windows. If you need
a package for a peripheral the file structure on the actually device shows
up so you can copy it to the lib directory.

https://pypi.org/project/pipkin/

pipkin is the command line utility. Thonny isn't my favorite IDE but it
does make life easy:

https://projects.raspberrypi.org/en/projects/getting-started-with-the-
pico/2
dn
2024-08-26 02:00:56 UTC
Permalink
It appears there were some delays in the email/servers.
Thanks for this (and earlier) ideas and advice!
Post by rbowman
With MicroPython on the Pico, you use some command line utility to
transfer files instead, but it is no big deal.
Loading the UF2 is easy.
https://www.raspberrypi.com/documentation/microcontrollers/
micropython.html
I use VS Code with the MicroPython extension so when the board is plugged
in it shows up as ttyACM0 or COM something I think on Windows. If you need
a package for a peripheral the file structure on the actually device shows
up so you can copy it to the lib directory.
https://pypi.org/project/pipkin/
pipkin is the command line utility. Thonny isn't my favorite IDE but it
https://projects.raspberrypi.org/en/projects/getting-started-with-the-
pico/2
--
Regards,
=dn
rbowman
2024-08-23 03:43:15 UTC
Permalink
Post by dn
Post by rbowman
Post by Paul Rubin
The Pico uses MicroPython which is stuck on an old version of Python,
unfortunately.
How did this enter the conversation/thread?
Paul's 'contribution' does not even appear on the Archive...
I'm probably guilty. I mentioned in passing the older protocols like
finger could even be implemented on something like the Pico W with
MicroPython.

I am confused by the cross-over to Python-list. I only read/post to
comp.lang.python. Is that echoed to Python-list or vice versa?
Post by dn
Post by rbowman
I haven't worked with CircuitPython lately and don't know if it has
pulled in later features.
Have you (gentle reader) used both and feel able to offer a comparison -
when to prefer one over the other?
I've only used CircuitPython on the Adafruit Playground Express.

https://circuitpython.org/board/circuitplayground_express/

and MicroPython on the Pico W. Since then Adafruit has expanded their
collection of boards and support them with CircuitPython.

One difference that makes them hard to compare is the Express has quite a
few on-board sensors like the Arduino Nano Sense 33, and interfaces to
them are baked into CircuitPython.

The Pico W has a wealth of I/O most doubling as I2C, PWM, or A/D with only
a onboard LED for the mandatory 'hello world' blink code. MicroPython is
more generic and you may have to import modules for specific external
devices like the SSD1306 OLED display. That's easily done with Thonny or
pipkin.

As far as core Python I'd say they're similar. MicroPython is more generic
and may require more work to set up where Adafruit can match the boards
they have developed.

As I said it's been a while but MicroPython has the _threading module so
you can utilize both cores of the RP2040. Adafruit's new Feather has a
RP2040 and like the Pico W assumes you'll be using the PIO to externals
rather than anything onboard so CircuitPython probably has it.

https://www.adafruit.com/product/4884

From the horse's mouth:

"There is great C/C++ support, unofficial (but really good) Arduino
support, an official MicroPython port, and a CircuitPython port! We of
course recommend CircuitPython because we think it's the easiest way to
get started and it has support with most of our drivers, displays,
sensors, and more, supported out of the box so you can follow along with
our CircuitPython projects and tutorials."

I don't know if Adafruit has a RP2350 board yet but they say CircuitPython
will be even happier on the Pico 2.

https://www.adafruit.com/product/6006

For better or worse there are a lot more choices now than fiddling around
with the Arduino Uno back in the day.
Lawrence D'Oliveiro
2024-08-23 03:55:21 UTC
Permalink
Post by rbowman
I am confused by the cross-over to Python-list. I only read/post to
comp.lang.python. Is that echoed to Python-list or vice versa?
This has been happening, without asking our permission, for years.
Keith Thompson
2024-08-24 23:04:47 UTC
Permalink
Post by Lawrence D'Oliveiro
Post by rbowman
I am confused by the cross-over to Python-list. I only read/post to
comp.lang.python. Is that echoed to Python-list or vice versa?
This has been happening, without asking our permission, for years.
The comp.lang.python newsgroup and the Python-list mailing list
are bidirectionally gatewayed. Both are public. Why is that a
problem for you? Whose permission do you think is needed?

https://mail.python.org/mailman/listinfo/python-list
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+***@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
dn
2024-08-23 04:23:42 UTC
Permalink
Post by rbowman
Post by dn
Post by rbowman
Post by Paul Rubin
The Pico uses MicroPython which is stuck on an old version of Python,
unfortunately.
How did this enter the conversation/thread?
Paul's 'contribution' does not even appear on the Archive...
I'm probably guilty. I mentioned in passing the older protocols like
finger could even be implemented on something like the Pico W with
MicroPython.
The question arose because his message doesn't appear either in the
conversation/email thread 'here', nor on the Archive. Perhaps not sent
to the list?
Post by rbowman
I am confused by the cross-over to Python-list. I only read/post to
comp.lang.python. Is that echoed to Python-list or vice versa?
As I understand it, posts to 'the list' may be made at comp.lang.python
or by email. Once on the server, messages are reflected back to both.
Thus, Thunderbird is not set-up to use the newsgroup and keeps
complaining at me when it's asked to reply to both. So, all
contributions (from me) enter the server via email.
Post by rbowman
Post by dn
Post by rbowman
I haven't worked with CircuitPython lately and don't know if it has
pulled in later features.
Have you (gentle reader) used both and feel able to offer a comparison -
when to prefer one over the other?
I've only used CircuitPython on the Adafruit Playground Express.
https://circuitpython.org/board/circuitplayground_express/
and MicroPython on the Pico W. Since then Adafruit has expanded their
collection of boards and support them with CircuitPython.
One difference that makes them hard to compare is the Express has quite a
few on-board sensors like the Arduino Nano Sense 33, and interfaces to
them are baked into CircuitPython.
The Pico W has a wealth of I/O most doubling as I2C, PWM, or A/D with only
a onboard LED for the mandatory 'hello world' blink code. MicroPython is
more generic and you may have to import modules for specific external
devices like the SSD1306 OLED display. That's easily done with Thonny or
pipkin.
Adding a display to the Pico-W is my next project... After that, gyros
(am thinking it may not go so well, on balance... hah!).

The Pico-W impresses. Its built-in Wi-Fi/Bluetooth capability makes life
a lot easier (inside building use).

Apart from the earlier comment, my biggest frustration has come from the
lack of facilities in Thonny compared with PyCharm - but will pick-up
skills there, no doubt.

Conversely, (to having a separate radio-chip) I think I prefer the idea
of being able to connect the Pico to whichever sensor(s) is/are
actually-required. However, this is applied use - not learning or 'playing'.
Post by rbowman
As far as core Python I'd say they're similar. MicroPython is more generic
and may require more work to set up where Adafruit can match the boards
they have developed.
As I said it's been a while but MicroPython has the _threading module so
you can utilize both cores of the RP2040. Adafruit's new Feather has a
RP2040 and like the Pico W assumes you'll be using the PIO to externals
rather than anything onboard so CircuitPython probably has it.
https://www.adafruit.com/product/4884
"There is great C/C++ support, unofficial (but really good) Arduino
support, an official MicroPython port, and a CircuitPython port! We of
course recommend CircuitPython because we think it's the easiest way to
get started and it has support with most of our drivers, displays,
sensors, and more, supported out of the box so you can follow along with
our CircuitPython projects and tutorials."
Whilst agreeing with the "easiest way to get started" claim, it probably
also leads to the assumption that it will (later) be easier to run out
of capability. Hence, that MicroPython would be the better professional
option - assuming one already knows Python.

Yes, a degree of 'comparing apples with oranges' - and a
continually-moving target!
Post by rbowman
I don't know if Adafruit has a RP2350 board yet but they say CircuitPython
will be even happier on the Pico 2.
https://www.adafruit.com/product/6006
No, out in the real-world, the Pico 2 is still vaporware.
Post by rbowman
For better or worse there are a lot more choices now than fiddling around
with the Arduino Uno back in the day.
True.
Hence the question.
Thanks for the comments!
--
Regards,
=dn
rbowman
2024-08-23 05:21:48 UTC
Permalink
Post by dn
Adding a display to the Pico-W is my next project... After that, gyros
(am thinking it may not go so well, on balance... hah!).
https://toptechboy.com/two-axis-tilt-meter-displaying-pitch-and-roll-
using-an-mpu6050-on-the-raspberry-pi-pico-w/

You might have to go back a lesson or two for the lead up. As he generally
says in the intro most of what he uses is from the Sunfounder Kepler kit.
It has a standard LCD display but he suggested buying the OLED separately
and used it for Lissajous patterns and other fancier stuff.

It's not a bad series although he can be long-winded and his Python style
definitely isn't PEP8 friendly.

https://toptechboy.com/

He switched to the Arduino Uno R4 after the IR controller/NeoPixel Pico
project and I don't know if he intends to go back to the Pico. He uses
Thonny but I use the MicroPython extension in VS Code. Lately I've been
using Code for everything. Mostly I work on Linux boxes but it's all the
same on Windows. There is a PlatformIO extension that works with Arduino
and other boards. PyLance upsets some because it's a MS product but it
works well too. I've used PyCharm and like it but I also work on C, .NET,
Angular, and other projects and Code gives me a uniform IDE.
a***@gmail.com
2024-08-26 01:29:30 UTC
Permalink
If everyone will pardon my curiosity, who and what purposes are these
smaller environments for and do many people use them?

I mean the price of a typical minimal laptop is not a big deal today. So are
these for some sort of embedded uses?

I read about them ages ago but wonder ...


-----Original Message-----
From: Python-list <python-list-bounces+avi.e.gross=***@python.org> On
Behalf Of rbowman via Python-list
Sent: Friday, August 23, 2024 1:22 AM
To: python-***@python.org
Subject: Re: new here
Post by dn
Adding a display to the Pico-W is my next project... After that, gyros
(am thinking it may not go so well, on balance... hah!).
https://toptechboy.com/two-axis-tilt-meter-displaying-pitch-and-roll-
using-an-mpu6050-on-the-raspberry-pi-pico-w/

You might have to go back a lesson or two for the lead up. As he generally
says in the intro most of what he uses is from the Sunfounder Kepler kit.
It has a standard LCD display but he suggested buying the OLED separately
and used it for Lissajous patterns and other fancier stuff.

It's not a bad series although he can be long-winded and his Python style
definitely isn't PEP8 friendly.

https://toptechboy.com/

He switched to the Arduino Uno R4 after the IR controller/NeoPixel Pico
project and I don't know if he intends to go back to the Pico. He uses
Thonny but I use the MicroPython extension in VS Code. Lately I've been
using Code for everything. Mostly I work on Linux boxes but it's all the
same on Windows. There is a PlatformIO extension that works with Arduino
and other boards. PyLance upsets some because it's a MS product but it
works well too. I've used PyCharm and like it but I also work on C, .NET,
Angular, and other projects and Code gives me a uniform IDE.
--
https://mail.python.org/mailman/listinfo/python-list
rbowman
2024-08-26 02:58:25 UTC
Permalink
Post by a***@gmail.com
If everyone will pardon my curiosity, who and what purposes are these
smaller environments for and do many people use them?
I mean the price of a typical minimal laptop is not a big deal today. So
are these for some sort of embedded uses?
I read about them ages ago but wonder ...
Typically they are used for I/O with the physical world. Some, like the
Arduino Nano Sense, have a number of sensors on the board including a 9
axis inertial, temperature, humidity, barometric, microphone, light
intensity, and color sensors. MIT chose this for their TinyML course
because it was one-stop shopping. Using TinyML, a really cut down version
of TensorFlow, gesture, wake word, image recognition, and other tasks were
move entirely to the edge device.

Others, like the Pico series, bring out the I/O pins but have little
onboard. Many pins are multi-purpose and are used for SPI or I2C
protocols, PWM, A/D measurements, and plain vanilla digital.

The Raspberry Pi series lives in both worlds. Particularly with the new Pi
5, it's usable as a desktop Linux system, if somewhat limited, while
bringing out the PIO pins.

It's really a different world than a typical laptop. Years (decades?) ago
you could subvert the parallel port controller to provide digital I/O but
who has seen a parallel port lately?

There are many families and devices available that are used for any number
of projects that need to interact with the real world. The earliest
variants were usually programmed in assembler since 2k of EPROM and 128
bytes of RAM was typical. As they improved C was sued. Now there's enough
flash and SRAM to support MicroPython or CircuitPython and they are fast
enough for most purposes. There are specialized drivers but if you know
Python the bulk of the logic will be very familiar.

For example I have a desktop Python app that pulls weather data from
NOAA's web API. The Pico W has Wifi, so if I wanted to compare NOAA's
temperature, humidity, and barometric pressure to the values I read from a
local sensor, the API requests and parsing the JSON reply would be almost
identical to the desktop code. Conversely I could use the Pico W as a web
server to make its sensor reading available.
Daniel
2024-08-28 07:41:28 UTC
Permalink
Post by rbowman
Post by a***@gmail.com
If everyone will pardon my curiosity, who and what purposes are these
smaller environments for and do many people use them?
I mean the price of a typical minimal laptop is not a big deal today. So
are these for some sort of embedded uses?
I read about them ages ago but wonder ...
Typically they are used for I/O with the physical world. Some, like the
Arduino Nano Sense, have a number of sensors on the board including a 9
axis inertial, temperature, humidity, barometric, microphone, light
intensity, and color sensors. MIT chose this for their TinyML course
because it was one-stop shopping. Using TinyML, a really cut down version
of TensorFlow, gesture, wake word, image recognition, and other tasks were
move entirely to the edge device.
Others, like the Pico series, bring out the I/O pins but have little
onboard. Many pins are multi-purpose and are used for SPI or I2C
protocols, PWM, A/D measurements, and plain vanilla digital.
The Raspberry Pi series lives in both worlds. Particularly with the new Pi
5, it's usable as a desktop Linux system, if somewhat limited, while
bringing out the PIO pins.
It's really a different world than a typical laptop. Years (decades?) ago
you could subvert the parallel port controller to provide digital I/O but
who has seen a parallel port lately?
There are many families and devices available that are used for any number
of projects that need to interact with the real world. The earliest
variants were usually programmed in assembler since 2k of EPROM and 128
bytes of RAM was typical. As they improved C was sued. Now there's enough
flash and SRAM to support MicroPython or CircuitPython and they are fast
enough for most purposes. There are specialized drivers but if you know
Python the bulk of the logic will be very familiar.
For example I have a desktop Python app that pulls weather data from
NOAA's web API. The Pico W has Wifi, so if I wanted to compare NOAA's
temperature, humidity, and barometric pressure to the values I read from a
local sensor, the API requests and parsing the JSON reply would be almost
identical to the desktop code. Conversely I could use the Pico W as a web
server to make its sensor reading available.
That is so cool. I've had the same idea to use the API with AWS for my
bbs. I also want to do the same thing for other government sites like
ecfr for pulling aviation regulations.

Is your code somewhere I can look at it?

Daniel
rbowman
2024-08-28 18:06:33 UTC
Permalink
Post by Daniel
That is so cool. I've had the same idea to use the API with AWS for my
bbs. I also want to do the same thing for other government sites like
ecfr for pulling aviation regulations.
Is your code somewhere I can look at it?
The NOAA? I didn't get dncy so I'm calling get_station_info with a
hardcoded latitude and longitude. The commented out print(json.dumps())
pretty print the JSON so you can decide what to extract. I'm not 100% sure
about tacking K onto the grid ID. The famous 'works for me' A URL like

https://forecast.weather.gov/MapClick.php?lat=40.8551337&lon=-114.0140115

will show the same info, in this case for Wendover Airport (KENV).

https://www.weather.gov/documentation/services-web-api

is the documentation for the API.

import json
import requests

def get_station_info(latitude, longitude):
url = f"https://api.weather.gov/points/{latitude},{longitude}"
response = requests.get(url).json()
# print(json.dumps(response, indent=4, sort_keys=True))
property = response['properties']
grid_id = property["gridId"]
grid_x = property["gridX"]
grid_y = property["gridY"]
forecast_url = property["forecast"]
observation_url = f"https://api.weather.gov/stations/K{grid_id}/
observations/latest"
response = requests.get(observation_url).json()
# print(json.dumps(response, indent=4, sort_keys=True))
properties = response['properties']
pressure = properties['barometricPressure']
temperature = properties['temperature']
humidity = properties['relativeHumidity']
dewpoint = properties['dewpoint']

temp = 9 * temperature['value'] / 5 + 32
dew = 9 * dewpoint['value'] / 5 + 32
hum = humidity['value']
bp = pressure['value'] * 0.000295
print(f"temperature {temp} dewpoint {dew:.2f} humidity {hum:.2f}
pressure {bp:.2f}\n")

response = requests.get(forecast_url).json()
properties = response['properties']
periods = properties['periods']
# print(json.dumps(period, indent=4, sort_keys=True))
for i in range(0, len(periods)):
period = periods[i]
print(period['name'])
print(period['detailedForecast'])
print(f"temperature: {period['temperature']}")
print(f"wind {period['windSpeed']} {period['windDirection']}")
print()

MRAB
2024-08-26 02:05:29 UTC
Permalink
Post by a***@gmail.com
If everyone will pardon my curiosity, who and what purposes are these
smaller environments for and do many people use them?
I mean the price of a typical minimal laptop is not a big deal today. So are
these for some sort of embedded uses?
I read about them ages ago but wonder ...
A Raspberry Pi Pico W costs less than £5, is a lot smaller, and has a
much lower power consumption than a laptop, so if it's good enough for
the purpose (embedded controller), why use a laptop? That's overkill!
Post by a***@gmail.com
-----Original Message-----
Behalf Of rbowman via Python-list
Sent: Friday, August 23, 2024 1:22 AM
Subject: Re: new here
Post by dn
Adding a display to the Pico-W is my next project... After that, gyros
(am thinking it may not go so well, on balance... hah!).
https://toptechboy.com/two-axis-tilt-meter-displaying-pitch-and-roll-
using-an-mpu6050-on-the-raspberry-pi-pico-w/
You might have to go back a lesson or two for the lead up. As he generally
says in the intro most of what he uses is from the Sunfounder Kepler kit.
It has a standard LCD display but he suggested buying the OLED separately
and used it for Lissajous patterns and other fancier stuff.
It's not a bad series although he can be long-winded and his Python style
definitely isn't PEP8 friendly.
https://toptechboy.com/
He switched to the Arduino Uno R4 after the IR controller/NeoPixel Pico
project and I don't know if he intends to go back to the Pico. He uses
Thonny but I use the MicroPython extension in VS Code. Lately I've been
using Code for everything. Mostly I work on Linux boxes but it's all the
same on Windows. There is a PlatformIO extension that works with Arduino
and other boards. PyLance upsets some because it's a MS product but it
works well too. I've used PyCharm and like it but I also work on C, .NET,
Angular, and other projects and Code gives me a uniform IDE.
a***@gmail.com
2024-08-26 03:38:45 UTC
Permalink
Thank you Michael. Embedded Controllers are something I personally have never had to deal with, except as an inviable part of things I use.

But, yes, things like that when cheap enough, make plenty of sense.



-----Original Message-----
From: Python-list <python-list-bounces+avi.e.gross=***@python.org> On Behalf Of MRAB via Python-list
Sent: Sunday, August 25, 2024 10:05 PM
To: python-***@python.org
Subject: Re: new here
Post by a***@gmail.com
If everyone will pardon my curiosity, who and what purposes are these
smaller environments for and do many people use them?
I mean the price of a typical minimal laptop is not a big deal today. So are
these for some sort of embedded uses?
I read about them ages ago but wonder ...
A Raspberry Pi Pico W costs less than £5, is a lot smaller, and has a
much lower power consumption than a laptop, so if it's good enough for
the purpose (embedded controller), why use a laptop? That's overkill!
Post by a***@gmail.com
-----Original Message-----
Behalf Of rbowman via Python-list
Sent: Friday, August 23, 2024 1:22 AM
Subject: Re: new here
Post by dn
Adding a display to the Pico-W is my next project... After that, gyros
(am thinking it may not go so well, on balance... hah!).
https://toptechboy.com/two-axis-tilt-meter-displaying-pitch-and-roll-
using-an-mpu6050-on-the-raspberry-pi-pico-w/
You might have to go back a lesson or two for the lead up. As he generally
says in the intro most of what he uses is from the Sunfounder Kepler kit.
It has a standard LCD display but he suggested buying the OLED separately
and used it for Lissajous patterns and other fancier stuff.
It's not a bad series although he can be long-winded and his Python style
definitely isn't PEP8 friendly.
https://toptechboy.com/
He switched to the Arduino Uno R4 after the IR controller/NeoPixel Pico
project and I don't know if he intends to go back to the Pico. He uses
Thonny but I use the MicroPython extension in VS Code. Lately I've been
using Code for everything. Mostly I work on Linux boxes but it's all the
same on Windows. There is a PlatformIO extension that works with Arduino
and other boards. PyLance upsets some because it's a MS product but it
works well too. I've used PyCharm and like it but I also work on C, .NET,
Angular, and other projects and Code gives me a uniform IDE.
--
https://mail.python.org/mailman/listinfo/python-list
a***@gmail.com
2024-08-21 03:16:48 UTC
Permalink
Matthew,

It hasn't been THAT quiet here and I have not heard suggestions this group
is going away.

I did look at the online forum and at first was annoyed as I do not want to
periodically log into various websites and prefer things to be consolidated
in my email. But, it seems you can turn on email to selectively send things
so it is also a mailing list.

I am guessing one difference may be that it is not gatewayed to old
newsgroups that periodically bring in folks who have disrupted. Another may
be the level of moderation of messages that may help keep it more civil or
even on-topic.

I do wonder if the people at python.org want multiple forums. There is also
one that sort of tutors people that obviously has an overlapping but
different audience.

Avi
-----Original Message-----
From: Python-list <python-list-bounces+avi.e.gross=***@python.org> On
Behalf Of MRAB via Python-list
Sent: Tuesday, August 20, 2024 7:12 PM
To: python-***@python.org
Subject: Re: new here
Post by Daniel
Hi folks -
New here. I've perused some posts and haven't seen a posting FAQ for
this NG. I'm learning python right now to realize some hobby goals I
have regarding some smolnet services. What are the NG standards on
pasting code in messages? Do yall prefer I post a pastebin link if it's
over a certain number of lines? I know this isn't IRC - just asking.
You'll find it rather quiet here because most activity has moved to here:

https://discuss.python.org/
--
https://mail.python.org/mailman/listinfo/python-list
rbowman
2024-08-21 04:11:58 UTC
Permalink
Post by a***@gmail.com
I do wonder if the people at python.org want multiple forums. There is
also one that sort of tutors people that obviously has an overlapping
but different audience.
https://realpython.com/

That's a mixed bag. Joining is $50 USD/month or $300/year but there are
also many tutorials that can be accessed for free. Personally I can't
justify the cost but it does add a community chat and Q&A with a 'Python
Expert'.

https://pycoders.com/

That's free and is more general information but some of the articles may
be pertinent.

@pycoders and @thepycoders on X tend to overlap the newsletter.
2***@potatochowder.com
2024-08-21 08:57:10 UTC
Permalink
On 2024-08-20 at 23:16:48 -0400,
Post by a***@gmail.com
I do wonder if the people at python.org want multiple forums. There is
also one that sort of tutors people that obviously has an overlapping
but different audience.
$ python -m this
The Zen of Python, by Tim Peters
[...]
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
[...]
dn
2024-08-21 10:21:28 UTC
Permalink
Post by Daniel
Hi folks -
New here. I've perused some posts and haven't seen a posting FAQ for
this NG. I'm learning python right now to realize some hobby goals I
have regarding some smolnet services. What are the NG standards on
pasting code in messages? Do yall prefer I post a pastebin link if it's
over a certain number of lines? I know this isn't IRC - just asking.
Welcome Daniel!

Despite some seeming to think of sending you elsewhere, there are a
number of people 'here' who regularly volunteer their time to help others.

As with any interaction, the quality of information in the question
directly impacts what can be offered in-response.

More of us can help with (pure) Python questions. Moving into
specialised areas may reduce the number who feel competent to answer.

We'll value any contribution you may be able to offer, and will look
forward to hearing of the projects you attempt...
--
Regards,
=dn
Daniel
2024-08-21 21:04:14 UTC
Permalink
Post by dn
Post by Daniel
Hi folks -
New here. I've perused some posts and haven't seen a posting FAQ for
this NG. I'm learning python right now to realize some hobby goals I
have regarding some smolnet services. What are the NG standards on
pasting code in messages? Do yall prefer I post a pastebin link if it's
over a certain number of lines? I know this isn't IRC - just asking.
Welcome Daniel!
Despite some seeming to think of sending you elsewhere, there are a
number of people 'here' who regularly volunteer their time to help others.
As with any interaction, the quality of information in the question
directly impacts what can be offered in-response.
More of us can help with (pure) Python questions. Moving into
specialised areas may reduce the number who feel competent to answer.
We'll value any contribution you may be able to offer, and will look
forward to hearing of the projects you attempt...
Thanks man. Yeah I'm not going anywhere. If I don't get good answers
from here then I'll go to IRC.

I am on forums but tend to stay away from them unless I absolutely have
to. I like newsgroups as they are - though I have noticed a massive drop
in users ever since Google dropped their groups service. I also saw a
minor drop in spam.

I'm not too worried about the trolls either.

D
rbowman
2024-08-22 04:30:35 UTC
Permalink
Post by Daniel
I am on forums but tend to stay away from them unless I absolutely have
to. I like newsgroups as they are - though I have noticed a massive drop
in users ever since Google dropped their groups service. I also saw a
minor drop in spam.
Absolutely. It was sort of an intelligence test. I've used the server at
the Freie Universität Berlin from back in the days when it was free rather
than 10 Euros a year so life went on smoothly.
a***@gmail.com
2024-08-22 20:07:28 UTC
Permalink
After looking at what is going on in the other area, I am convinced that we
need multiple boards with different ideas of what should be moderated or
even ones where only very egregious behavior gets you banned. There is
serious debate there about whether the group of people in charge of a more
focused set of duties should even be given the ability to manage the mailing
lists versus others.

There are advantages to having a safe environment but not when the keepers
want to stifle dissent or promote their own agendas as if everyone buys into
them.

I see hints there will be changes there as they were a tad tone deaf and did
not seem to care if anyone objected.

Let's keep this forum going.

-----Original Message-----
From: Python-list <python-list-bounces+avi.e.gross=***@python.org> On
Behalf Of Dan Sommers via Python-list
Sent: Wednesday, August 21, 2024 4:57 AM
To: python-***@python.org
Subject: Re: new here

On 2024-08-20 at 23:16:48 -0400,
Post by a***@gmail.com
I do wonder if the people at python.org want multiple forums. There is
also one that sort of tutors people that obviously has an overlapping
but different audience.
$ python -m this
The Zen of Python, by Tim Peters
[...]
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
[...]
--
https://mail.python.org/mailman/listinfo/python-list
Marco Moock
2024-08-23 13:09:06 UTC
Permalink
Post by Daniel
New here. I've perused some posts and haven't seen a posting FAQ for
this NG. I'm learning python right now to realize some hobby goals I
have regarding some smolnet services. What are the NG standards on
pasting code in messages? Do yall prefer I post a pastebin link if
it's over a certain number of lines? I know this isn't IRC - just
asking.
Welcome!

Pastebin and other stuff has the disadvantage that the content might be
removed later.

What about pasting it under your actual message if it is really too
long?
--
kind regards
Marco
Loading...