[ANN] New version 2.1.0 of L.Pointal's Python 3 Cheat Sheet

2025-05-14 Thread Laurent Pointal via Python-list
Hello, In the context of a move for hosting of my one recto-verso pdf cheat sheet, I updated it to add Python's news stuff and make a new 2.1.0 version (latest version, 2.0.6, was from 2017). DOWNLOAD English version is at https://py3cheatsheet.lisn.fr/ (its a short URL fore

ANN: A new version (0.5.4) of python-gnupg has been released.

2025-01-07 Thread Vinay Sajip via Python-list
What Changed?= This is an enhancement and bug-fix release, and all users are encouraged to upgrade. Brief summary: * Fix #242: Handle exceptions in the `on_data` callable. This release [2] has been signed with my code signing key: Vinay Sajip (CODE SIGNING KEY) Fingerprint: CA74 9

ANN: A new version (0.5.3) of python-gnupg has been released.

2024-09-20 Thread Vinay Sajip via Python-list
What Changed?= This is an enhancement and bug-fix release, and all users are encouraged to upgrade. Brief summary: - * Fix #117: Add WKD (Web Key Directory) support for auto-locating keys. Thanks to Myzel394 for the patch. * Fix #237: Ensure local variable is initialized eve

Re: new here

2024-08-28 Thread rbowman via Python-list
On Wed, 28 Aug 2024 08:41:28 +0100, Daniel wrote: > 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 di

Re: new here

2024-08-28 Thread Daniel via Python-list
s 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

Re: new here

2024-08-26 Thread rbowman via Python-list
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

RE: new here

2024-08-25 Thread AVI GROSS via Python-list
: Sunday, August 25, 2024 10:05 PM To: python-list@python.org Subject: Re: new here On 2024-08-26 02:29, AVI GROSS via Python-list wrote: > If everyone will pardon my curiosity, who and what purposes are these > smaller environments for and do many people use them? > > I mean th

Re: new here

2024-08-25 Thread MRAB via Python-list
om: Python-list On Behalf Of rbowman via Python-list Sent: Friday, August 23, 2024 1:22 AM To: python-list@python.org Subject: Re: new here On Fri, 23 Aug 2024 16:23:42 +1200, dn wrote: Adding a display to the Pico-W is my next project... After that, gyros (am thinking it may not go so well, on bala

Re: new here

2024-08-25 Thread dn via Python-list
It appears there were some delays in the email/servers. Thanks for this (and earlier) ideas and advice! On 23/08/24 17:38, rbowman via Python-list wrote: On Thu, 22 Aug 2024 19:56:54 -0700, Paul Rubin wrote: With MicroPython on the Pico, you use some command line utility to transfer files ins

RE: new here

2024-08-25 Thread AVI GROSS via Python-list
Message- From: Python-list On Behalf Of rbowman via Python-list Sent: Friday, August 23, 2024 1:22 AM To: python-list@python.org Subject: Re: new here On Fri, 23 Aug 2024 16:23:42 +1200, dn wrote: > Adding a display to the Pico-W is my next project... After that, gyros > (am thinking

Re: new here

2024-08-25 Thread Keith Thompson via Python-list
Lawrence D'Oliveiro writes: > On 23 Aug 2024 03:43:15 GMT, rbowman wrote: >> 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.p

Re: new here

2024-08-25 Thread Marco Moock via Python-list
On 20.08.2024 um 23:26 Uhr Daniel wrote: > 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

Re: new here

2024-08-25 Thread rbowman via Python-list
On Fri, 23 Aug 2024 16:23:42 +1200, dn wrote: > 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

Re: new here

2024-08-25 Thread rbowman via Python-list
On Thu, 22 Aug 2024 19:56:54 -0700, Paul Rubin wrote: > 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 th

Re: new here

2024-08-22 Thread dn via Python-list
ey 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

Re: new here

2024-08-22 Thread rbowman via Python-list
hon 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

Re: new here

2024-08-22 Thread dn via Python-list
On 23/08/24 07:49, rbowman via Python-list wrote: On Thu, 22 Aug 2024 10:40:52 -0700, Paul Rubin wrote: 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..

Re: new here

2024-08-22 Thread rbowman via Python-list
On Thu, 22 Aug 2024 09:10:00 +0100, Daniel wrote: > If you have lynx, you can visit this gopher interface to Wikipedia: > > 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 reco

RE: new here

2024-08-22 Thread AVI GROSS via Python-list
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 On Behalf Of Dan Sommers via Python-list Sent: Wednesday, August 21, 2024 4:57 AM To: python-list@python.org Subject: Re: new here On 2024-08-20 at

Re: new here

2024-08-22 Thread rbowman via Python-list
On Thu, 22 Aug 2024 10:40:52 -0700, Paul Rubin wrote: > 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 wal

Re: new here

2024-08-22 Thread Daniel via Python-list
Jason Friedman writes: > On Wed, Aug 21, 2024 at 4:04 PM Daniel via Python-list < > python-list@python.org> wrote: > >> >> 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 mi...@graph.no >>

Re: new here

2024-08-22 Thread Daniel via Python-list
rbowman writes: > On Wed, 21 Aug 2024 22:15:37 +0100, Daniel wrote: > >> 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.

Re: new here

2024-08-22 Thread rbowman via Python-list
On Thu, 22 Aug 2024 13:43:59 +1200, dn wrote: > 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. -- https://mail.python.org/mailma

Re: new here

2024-08-22 Thread rbowman via Python-list
On Wed, 21 Aug 2024 22:15:37 +0100, Daniel wrote: > 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

Re: new here

2024-08-22 Thread rbowman via Python-list
On Wed, 21 Aug 2024 22:04:14 +0100, Daniel wrote: > 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. Abso

Re: new here

2024-08-21 Thread Jason Friedman via Python-list
On Wed, Aug 21, 2024 at 4:04 PM Daniel via Python-list < python-list@python.org> wrote: > > 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 mi...@graph.no > > For all options, go to the help f

Re: new here

2024-08-21 Thread dn via Python-list
On 22/08/24 09:15, Daniel via Python-list wrote: rbowman writes: On Tue, 20 Aug 2024 23:26:39 +0100, Daniel wrote: ... 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

Re: new here

2024-08-21 Thread Daniel via Python-list
rbowman writes: > On Tue, 20 Aug 2024 23:26:39 +0100, Daniel wrote: > >> 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.

Re: new here

2024-08-21 Thread Daniel via Python-list
dn writes: > On 21/08/24 10:26, Daniel via Python-list wrote: >> 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 smol

Re: new here

2024-08-21 Thread dn via Python-list
On 21/08/24 10:26, Daniel via Python-list wrote: 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

Re: new here

2024-08-21 Thread Dan Sommers via Python-list
On 2024-08-20 at 23:16:48 -0400, AVI GROSS via Python-list wrote: > 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 [...] The

Re: new here

2024-08-20 Thread rbowman via Python-list
On Tue, 20 Aug 2024 23:16:48 -0400, avi.e.gross wrote: > 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 o

Re: new here

2024-08-20 Thread rbowman via Python-list
On Tue, 20 Aug 2024 23:26:39 +0100, Daniel wrote: > 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 > pastin

RE: new here

2024-08-20 Thread AVI GROSS via Python-list
ython-list@python.org Subject: Re: new here On 2024-08-20 23:26, Daniel via Python-list wrote: > 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 som

Re: new here

2024-08-20 Thread MRAB via Python-list
On 2024-08-20 23:26, Daniel via Python-list wrote: 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

new here

2024-08-20 Thread Daniel via Python-list
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

Re: A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-09 Thread אורי via Python-list
Thank you. Uri. אורי u...@speedy.net On Tue, Jul 9, 2024 at 6:40 PM Barry Scott wrote: > > > On 9 Jul 2024, at 06:13, ⁨אורי via Python-list⁩ <⁨python-list@python.org⁩> > wrote: > > I tried to subscribe to Python-ideas > > > These days ideas are discussed on https://discuss.python.org/ > It is

Re: A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-09 Thread Barry Scott via Python-list
> On 9 Jul 2024, at 06:13, ⁨אורי via Python-list⁩ <⁨python-list@python.org⁩> > wrote: > > I tried to subscribe to Python-ideas These days ideas are discussed on https://discuss.python.org/ It is rare to see an idea on the mailing list. Barry -- https://mail.python.org/mailman/listinfo/pyt

A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-08 Thread אורי via Python-list
ve to create a new account? Thanks, Uri. אורי u...@speedy.net -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-02-04 Thread dn via Python-list
On 4/02/24 13:20, avi.e.gr...@gmail.com wrote: Dave, You and I have had some experience in teaching or tutoring others and I think it fair to say our motivation is closer to teaching someone how they can fish for themselves rather than just handing them a fully-cooked fish. Which may push th

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
urday, February 3, 2024 5:02 PM To: python-list@python.org Subject: Re: Extract lines from file, add to new files Every trainer, in any field, has to deal with these problems - all the time, and over-and-over. On 4/02/24 06:58, Thomas Passin via Python-list wrote: > In my view this whole threa

Re: Extract lines from file, add to new files

2024-02-03 Thread Thomas Passin via Python-list
ave a drawback that it's hard to impossible for someone not involved in a thread to learn anything general from it. We can write over and over again to please state clearly what you want to do and where the sticking points are, but newcomers post new questions without ever reading these pleas. 

Re: Extract lines from file, add to new files

2024-02-03 Thread dn via Python-list
for someone not involved in a thread to learn anything general from it. We can write over and over again to please state clearly what you want to do and where the sticking points are, but newcomers post new questions without ever reading these pleas.  Then good-hearted people who want to be hel

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
ginal Message- From: Python-list On Behalf Of Thomas Passin via Python-list Sent: Saturday, February 3, 2024 12:59 PM To: python-list@python.org Subject: Re: Extract lines from file, add to new files In my view this whole thread became murky and complicated because the OP did not wri

Re: Extract lines from file, add to new files

2024-02-03 Thread Mats Wichmann via Python-list
to visibility. Mailing lists like these have a drawback that it's hard to impossible for someone not involved in a thread to learn anything general from it. We can write over and over again to please state clearly what you want to do and where the sticking points are, but newcomers post ne

Re: Extract lines from file, add to new files

2024-02-03 Thread Thomas Passin via Python-list
that it's hard to impossible for someone not involved in a thread to learn anything general from it. We can write over and over again to please state clearly what you want to do and where the sticking points are, but newcomers post new questions without ever reading these pleas. Then good

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
and maybe garbage collection was not automatic, ... -Original Message- From: Python-list On Behalf Of Thomas Passin via Python-list Sent: Wednesday, January 31, 2024 7:25 AM To: python-list@python.org Subject: Re: Extract lines from file, add to new files On 1/30/2024 11:25 PM, avi.e.gr

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
:36 AM To: python-list@python.org Subject: Re: Extract lines from file, add to new files On 1/31/2024 9:05 AM, Rich Shepard via Python-list wrote: > On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: > >> If I had a script that's been working for 30 years, I'd probably

Re: Extract lines from file, add to new files

2024-01-31 Thread Thomas Passin via Python-list
On 1/31/2024 9:05 AM, Rich Shepard via Python-list wrote: On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: If I had a script that's been working for 30 years, I'd probably just use Python to do the personalizing and let the rest of the bash script do the rest, like it always has. The P

Re: Extract lines from file, add to new files

2024-01-31 Thread Rich Shepard via Python-list
On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: If I had a script that's been working for 30 years, I'd probably just use Python to do the personalizing and let the rest of the bash script do the rest, like it always has. The Python program would pipe or send the personalized messages

Re: Extract lines from file, add to new files

2024-01-31 Thread Thomas Passin via Python-list
python.org Subject: Re: Extract lines from file, add to new files On 1/30/2024 12:21 PM, Rich Shepard via Python-list wrote: On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: Fine, my toy example will still be applicable. But, you know, you haven't told us enough to give you help.

RE: Extract lines from file, add to new files

2024-01-30 Thread AVI GROSS via Python-list
Python-list Sent: Tuesday, January 30, 2024 10:37 PM To: python-list@python.org Subject: Re: Extract lines from file, add to new files On 1/30/2024 12:21 PM, Rich Shepard via Python-list wrote: > On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: > >> Fine, my toy example w

Re: Extract lines from file, add to new files

2024-01-30 Thread Thomas Passin via Python-list
On 1/30/2024 12:21 PM, Rich Shepard via Python-list wrote: On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: Fine, my toy example will still be applicable. But, you know, you haven't told us enough to give you help. Do you want to replace text from values in a file? That's been covered.

Re: Aw: Re: Extract lines from file, add to new files

2024-01-30 Thread Mats Wichmann via Python-list
On 1/30/24 14:46, AVI GROSS via Python-list wrote: Rich, You may want to broaden your perspective a bit when people make suggestions. Karsten did not spell out a full design and should not need to. But consider this as a scenario. You want to send (almost) the same message to one or more reci

RE: Aw: Re: Extract lines from file, add to new files

2024-01-30 Thread AVI GROSS via Python-list
program will then simply identify each email recipient you want and look up the other info and prepend the customized salutation, or make substitutions in the template and write out a new file in the designated folder with perhaps the email address as the filename. When your loop ends, exit the python

Aw: Re: Re: Re: Extract lines from file, add to new files

2024-01-30 Thread Karsten Hilbert via Python-list
> On Tue, 30 Jan 2024, Karsten Hilbert wrote: > > > It doesn't need to. It just sends the (pre-personalized-by-Python) mail > > files. > > Karsten, > > In which case, I might as well have Python format and send the messages. :-) Certainly. But it seems you are wrestling with Python. Might as well

Re: Aw: Re: Re: Extract lines from file, add to new files

2024-01-30 Thread Rich Shepard via Python-list
On Tue, 30 Jan 2024, Karsten Hilbert wrote: It doesn't need to. It just sends the (pre-personalized-by-Python) mail files. Karsten, In which case, I might as well have Python format and send the messages. :-) Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Aw: Re: Re: Extract lines from file, add to new files

2024-01-30 Thread Karsten Hilbert via Python-list
> > Why not foxus on just the part you think you are better off using python, > > namely personalization ? > > > > Create personalized files and send them with your trusted mailx solution ? > > Karsten, > > Too much time. And while mailx accepts the '-a' option for attachments but > has none for

Re: Aw: Re: Extract lines from file, add to new files

2024-01-30 Thread Rich Shepard via Python-list
On Tue, 30 Jan 2024, Karsten Hilbert wrote: Why not foxus on just the part you think you are better off using python, namely personalization ? Create personalized files and send them with your trusted mailx solution ? Karsten, Too much time. And while mailx accepts the '-a' option for attach

Aw: Re: Extract lines from file, add to new files

2024-01-30 Thread Karsten Hilbert via Python-list
> For 30 years I've used a bash script using mailx to send messages to a list > of recipients. They have no salutation to personalize each one. Since I want > to add that personalized salutation I decided to write a python script to > replace the bash script. Why not foxus on just the part you thi

RE: Extract lines from file, add to new files

2024-01-30 Thread Rich Shepard via Python-list
On Tue, 30 Jan 2024, AVI GROSS via Python-list wrote: But seriously, the OP, AKA Rich, is making clear that he is making a tool for his own use. It sounds like he wants to maintain a data repository of his own with some info about his clients and then have the ability to specify a name and pop u

Re: Extract lines from file, add to new files

2024-01-30 Thread Rich Shepard via Python-list
On Tue, 30 Jan 2024, Thomas Passin via Python-list wrote: Fine, my toy example will still be applicable. But, you know, you haven't told us enough to give you help. Do you want to replace text from values in a file? That's been covered. Do you want to send the messages using those libraries? You

RE: Extract lines from file, add to new files

2024-01-30 Thread AVI GROSS via Python-list
I deleted the contents of the message so I can avoid both of the deadly sins of top posting and bottom posting and chance committing the sin of replying without any context. Of course, I am only replying to Jon wishing a real or feigned good luck to the OP. But seriously, the OP, AKA Rich, is m

Re: Extract lines from file, add to new files

2024-01-30 Thread Thomas Passin via Python-list
On 1/30/2024 8:37 AM, Rich Shepard via Python-list wrote: On Mon, 29 Jan 2024, Thomas Passin via Python-list wrote: If you aren't going to use one or another existing template system, perhaps the easiest is to use unique strings in the message file. For example: Dear __##so-and-so##__:   Pleas

Re: Extract lines from file, add to new files

2024-01-30 Thread Larry Martell via Python-list
On Tue, Jan 30, 2024 at 1:13 AM AVI GROSS via Python-list wrote: > > It can be quite frustrating figuring out what someone wants, Grant, > especially when they just change it. > > It is worse when instead of starting a new thread with an appropriate > subject line, it continue

Re: Extract lines from file, add to new files

2024-01-30 Thread Rich Shepard via Python-list
On Mon, 29 Jan 2024, Thomas Passin via Python-list wrote: If you aren't going to use one or another existing template system, perhaps the easiest is to use unique strings in the message file. For example: Dear __##so-and-so##__: Please don't write this message off as mere spam. Respectfully

RE: Extract lines from file, add to new files

2024-01-29 Thread AVI GROSS via Python-list
It can be quite frustrating figuring out what someone wants, Grant, especially when they just change it. It is worse when instead of starting a new thread with an appropriate subject line, it continues and old one that was also frustrating to understand. It sounds though like another attempt to

Re: Extract lines from file, add to new files

2024-01-29 Thread Thomas Passin via Python-list
On 1/29/2024 11:15 AM, Rich Shepard via Python-list wrote: For my use 1) the salutation and email address (always with an '@') are sequential and 2) I'm developing the script to extract both from the same file. I've looked at my Python books "Python Crash Course," "Effective Python," and "Pytho

Re: Extract lines from file, add to new files

2024-01-29 Thread Grant Edwards via Python-list
On 2024-01-29, Rich Shepard via Python-list wrote: > On Mon, 29 Jan 2024, Rich Shepard via Python-list wrote: > >> No, I hadn't ... but I am reading it now. > > Perhaps I missed the answer to my question when reading the io module. It > explains how to open/write/read files of text and binary data

Re: Extract lines from file, add to new files

2024-01-29 Thread dn via Python-list
On 30/01/24 05:15, Rich Shepard via Python-list wrote: On Fri, 12 Jan 2024, Rich Shepard via Python-list wrote: For my use 1) the salutation and email address (always with an '@') are sequential and 2) I'm developing the script to extract both from the same file. I've looked at my Python book

RE: Extract lines from file, add to new files

2024-01-29 Thread Rich Shepard via Python-list
On Mon, 29 Jan 2024, avi.e.gr...@gmail.com wrote: There are several general solutions that may apply. Some involve reading in both files into data structures and perhaps linking them together in some way such as a data.frame or binary tree. You can then process individual request in memory/ Av

RE: Extract lines from file, add to new files

2024-01-29 Thread AVI GROSS via Python-list
: Extract lines from file, add to new files On Mon, 29 Jan 2024, Rich Shepard via Python-list wrote: > No, I hadn't ... but I am reading it now. Perhaps I missed the answer to my question when reading the io module. It explains how to open/write/read files of text and binary data, not p

RE: Extract lines from file, add to new files [RESOLVED]

2024-01-29 Thread Rich Shepard via Python-list
On Mon, 29 Jan 2024, Rich Shepard via Python-list wrote: I'll keep searching for a solution. IIRC, someone here pointed me to and I forgot about it ... until now. Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

RE: Extract lines from file, add to new files

2024-01-29 Thread Rich Shepard via Python-list
On Mon, 29 Jan 2024, Rich Shepard via Python-list wrote: No, I hadn't ... but I am reading it now. Perhaps I missed the answer to my question when reading the io module. It explains how to open/write/read files of text and binary data, not passing a variable's value from one file to a place-ke

RE: Extract lines from file, add to new files

2024-01-29 Thread Dieter Maurer via Python-list
Rich Shepard wrote at 2024-1-29 08:15 -0800: > ... >If this explanation is not sufficiently clear I'll re-write it. :-) Have you read "https://docs.python.org/3/library/io.html#module-io";? -- https://mail.python.org/mailman/listinfo/python-list

RE: Extract lines from file, add to new files

2024-01-29 Thread Rich Shepard via Python-list
On Mon, 29 Jan 2024, dieter.mau...@online.de wrote: Have you read "https://docs.python.org/3/library/io.html#module-io";? Dieter, No, I hadn't ... but I am reading it now. Many thanks, Rich -- https://mail.python.org/mailman/listinfo/python-list

RE: Extract lines from file, add to new files

2024-01-29 Thread Rich Shepard via Python-list
On Fri, 12 Jan 2024, Rich Shepard via Python-list wrote: For my use 1) the salutation and email address (always with an '@') are sequential and 2) I'm developing the script to extract both from the same file. I've looked at my Python books "Python Crash Course," "Effective Python," and "Python

Re: Extract lines from file, add to new files

2024-01-15 Thread Antoon Pardon via Python-list
Op 14/01/2024 om 13:28 schreef Left Right via Python-list: Python isn't a context-free language, so the grammar that is used to describe it doesn't actually describe the language... so, it's a "pretend grammar" that ignores indentation. No it doesn't. Here is the definition of a block, it cl

Re: Extract lines from file, add to new files

2024-01-15 Thread dn via Python-list
On 15/01/24 21:13, Greg Ewing via Python-list wrote: On 15/01/24 1:54 pm, dn wrote: Soon after, Wirth simplified rather than expanded, and developed Pascal. Before Pascal there was Algol-W, which Wirth invented as a rebellion against how complicated Algol 68 was becoming. When I first saw thi

Re: Extract lines from file, add to new files

2024-01-15 Thread Chris Angelico via Python-list
On Mon, 15 Jan 2024 at 19:26, Greg Ewing via Python-list wrote: > > On 15/01/24 9:07 pm, Chris Angelico wrote: > > The grammar *can't* specify everything. If it did, it would have to > > have rules for combining individual letters into a NAME and individual > > characters into a string literal. >

Re: Extract lines from file, add to new files

2024-01-15 Thread Greg Ewing via Python-list
On 15/01/24 9:07 pm, Chris Angelico wrote: The grammar *can't* specify everything. If it did, it would have to have rules for combining individual letters into a NAME and individual characters into a string literal. The lexical level of a grammar can be, and often is, described formally using r

Re: Extract lines from file, add to new files

2024-01-15 Thread Greg Ewing via Python-list
On 15/01/24 1:54 pm, dn wrote: Soon after, Wirth simplified rather than expanded, and developed Pascal. Before Pascal there was Algol-W, which Wirth invented as a rebellion against how complicated Algol 68 was becoming. When I first saw this I was stunned, then attracted to its simplicity, bu

Re: Extract lines from file, add to new files

2024-01-15 Thread Chris Angelico via Python-list
On Mon, 15 Jan 2024 at 18:56, Greg Ewing via Python-list wrote: > > On 15/01/24 1:28 am, Left Right wrote: > > Python isn't a context-free language, so the grammar that is used to > > describe it doesn't actually describe the language > > Very few languages have a formal grammar that *fully* descr

Re: Extract lines from file, add to new files

2024-01-14 Thread Greg Ewing via Python-list
On 15/01/24 1:28 am, Left Right wrote: Python isn't a context-free language, so the grammar that is used to describe it doesn't actually describe the language Very few languages have a formal grammar that *fully* describes the set of strings that constitute valid programs, including all the rul

Re: Extract lines from file, add to new files

2024-01-14 Thread Greg Ewing via Python-list
On 13/01/24 11:34 pm, Left Right wrote: To make this shorter, Python allows: for in ... : ... Um, no, it doesn't. An assignment target is not, on its own, a statement. It's hard to make sense of what you're saying. You seem to be surprised by the fact that Python doesn't require variables t

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
On 15/01/24 14:45, Chris Angelico wrote: On Mon, 15 Jan 2024 at 12:42, dn via Python-list wrote: On 15/01/24 14:33, Chris Angelico via Python-list wrote: On Mon, 15 Jan 2024 at 12:12, dn via Python-list wrote: Here's another witticism I'll often toss at trainees (in many languages, and espe

Re: Extract lines from file, add to new files

2024-01-14 Thread Chris Angelico via Python-list
On Mon, 15 Jan 2024 at 12:42, dn via Python-list wrote: > > On 15/01/24 14:33, Chris Angelico via Python-list wrote: > > On Mon, 15 Jan 2024 at 12:12, dn via Python-list > > wrote: > >> Here's another witticism I'll often toss at trainees (in many languages, > >> and especially in UX): just beca

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
On 15/01/24 14:33, Chris Angelico via Python-list wrote: On Mon, 15 Jan 2024 at 12:12, dn via Python-list wrote: Here's another witticism I'll often toss at trainees (in many languages, and especially in UX): just because we can do it, doesn't make it a good idea! Programming. We were so bus

Re: Extract lines from file, add to new files

2024-01-14 Thread Chris Angelico via Python-list
On Mon, 15 Jan 2024 at 12:12, dn via Python-list wrote: > Here's another witticism I'll often toss at trainees (in many languages, > and especially in UX): just because we can do it, doesn't make it a good > idea! > Programming. We were so busy with whether we COULD that we didn't stop to think i

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
On 15/01/24 11:47, Chris Angelico via Python-list wrote: On Mon, 15 Jan 2024 at 09:40, dn via Python-list wrote: The basic challenge came from my earlier (and blasé) repetition of the Python refrain "everything in Python is an object". Which led to: ... So, no, there's an "everything" which

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
On 15/01/24 08:06, AVI GROSS via Python-list wrote: ...> You provided a way to create an anonymous function and that was not enough. I wonder if you could throw in the new := walrus operator to similarly make a named lambda function in a similar way. Why would @Chris have anything to do w

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
s been realised that there is a flaw, and things need to be improved, even removed. You've made comments about BNF. Like Python, it is a 'language' (a bit of stretch, but...) which has also been pulled, poked, and perhaps contorted over time. It had a body of folk who understood

RE: Extract lines from file, add to new files

2024-01-14 Thread AVI GROSS via Python-list
n-list On Behalf Of Left Right via Python-list Sent: Sunday, January 14, 2024 7:28 AM To: Chris Angelico Cc: python-list@python.org Subject: Re: Extract lines from file, add to new files > Second time to ameliorate wording-dispute in this thread! The original > phrase was: "[modified] BN

Re: Extract lines from file, add to new files

2024-01-14 Thread Chris Angelico via Python-list
On Mon, 15 Jan 2024 at 09:40, dn via Python-list wrote: > The basic challenge came from my earlier (and blasé) repetition of the > Python refrain "everything in Python is an object". Which led to: > > <<< > For example, you may say "functions in Python are > objects", but you cannot put a function

RE: Extract lines from file, add to new files

2024-01-14 Thread AVI GROSS via Python-list
avi.e.gr...@gmail.com Cc: Chris Angelico ; python-list@python.org Subject: Re: Extract lines from file, add to new files > You said function. I made a function. You said "head of a for loop > clause". I put it there. Problem was underspecified. I also wrote a lot of letters, if y

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
On 15/01/24 10:23, Chris Angelico via Python-list wrote: On Mon, 15 Jan 2024 at 08:15, Left Right wrote: Python grammar rules prevent function definition from appearing in left-hand side of the head of the for loop. However, a variable declaration, which is also a statement, is allowed there.

Re: Extract lines from file, add to new files

2024-01-14 Thread Left Right via Python-list
onymous function and that was not enough. > I wonder if you could throw in the new := walrus operator to similarly make > a named lambda function in a similar way. The person you are replying to didn't understand the question and has written something irrelevant. It's not about be

Re: Extract lines from file, add to new files

2024-01-14 Thread Left Right via Python-list
> Second time to ameliorate wording-dispute in this thread! The original > phrase was: "[modified] BNF". Some of us have worked with various forms > and evolutions of BNF since back in the days of COBOL-60 proposals, and > know it when we see it! OK, here are the conceptual differences between wha

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
On 14/01/24 16:48, Chris Angelico wrote: On Sun, 14 Jan 2024 at 14:43, dn via Python-list wrote: Similarly, whilst we could write: a, b, c = 1, 2, 3 I would only do this when it aligns particularly well with the algorithm being implemented. For example, you could start a Fibonacci evaluator

Re: Extract lines from file, add to new files

2024-01-14 Thread Left Right via Python-list
> What do you mean? > > for x in lambda: ...: > ... > > Perfectly grammatical. 1. You put the lambda definition in the wrong place (it should be in the left-hand side, or as Python calls it "star_targets", but you put it into "star_expressions", which would be where the right-hand side is drawn

  1   2   3   4   5   6   7   8   9   10   >