Re: Where are the moderators?

2018-01-19 Thread Grant Edwards
service seems to be working. There are some "groups" where I've noticed that posting works, but traffic in the other direction mail->nntp is intermittent. -- Grant Edwards grant.b.edwardsYow! Did something bad at

Re: How to use asyncore with SSL?

2018-01-19 Thread Grant Edwards
On 2018-01-19, Marko Rauhamaa wrote: > Grant Edwards : > >> I've been trying to use the secure smtpd module from >> https://github.com/bcoe/secure-smtpd, but the SSL support seems to be >> fundamentally broken. [...] >> I'm trying to fix that, but I can&#x

Re: How to use asyncore with SSL?

2018-01-20 Thread Grant Edwards
On 2018-01-18, Grant Edwards wrote: [regarding secure-smtpd -- a module based on smtpd and asyncore] > That makes the SSL support pretty much useless. > > I'm trying to fix that, but I can't find any information or > documentation about using asyncore with SSL. Asyncor

Re: How to use asyncore with SSL?

2018-01-20 Thread Grant Edwards
On 2018-01-20, Marko Rauhamaa wrote: > Grant Edwards : > >> Asyncore seems to be based on fundamental assumptions that aren't true >> for non-blocking ssl sockets. > > Pot calling kettle black. > > OpenSSL isn't the easiest beast to deal with, but I have

Re: How to use asyncore with SSL?

2018-01-20 Thread Grant Edwards
On 2018-01-20, Marko Rauhamaa wrote: > Grant Edwards : [...] >> I won't argue with that. I think that non-blocking ssl-wrapped >> sockets _should_ have the same select/poll/send/recv API/semantics >> that normal sockets do. I thought about writing my own >> wr

Re: error from Popen only when run from cron

2018-01-27 Thread Grant Edwards
On 2018-01-27, Larry Martell wrote: > I have a script that does this: > > subprocess.Popen(['service', 'some_service', 'status'], > stdout=subprocess.PIPE, stderr=subprocess.STDOUT) > > When I run it from the command line it works fine. When I run it from > cron I get: > > subprocess.Popen(['s

Re: Compression of random binary data (Posting On Python-List Prohibited)

2018-01-28 Thread Grant Edwards
On 2018-01-28, pendrysamm...@gmail.com wrote: > I have it in my head, just need someone to write the program for me, > I know nothing about data compression or binary data other than 1s > and 0s and that you can not take 2 number without a possible value > more or less than them selves and compre

Re: Where has the practice of sending screen shots as source code come from?

2018-01-28 Thread Grant Edwards
On 2018-01-28, Skip Montanaro wrote: > I've noticed it as well. I suspect it's from the Windows universe where > it's common to snip a bit of the screen which isn't pure text when asking > about some problematic GUI thing which is causing problems. It's definitely a Windows thing. Most Windows

Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Grant Edwards
nd kept the TV volume low. Really. -- Grant Edwards grant.b.edwardsYow! The FALAFEL SANDWICH at lands on my HEAD and I gmail.combecome a VEGETARIAN ... -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] Dutch Reach [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Grant Edwards
lane" and the curb[*], in which case it's the passenger side doors that are used to catch bicycles rather than the driver's side doors. [*] This seems to be increasingly common here in the Minneapolis / St. Paul area -- Grant Edwards grant.b.edwards

Re: [OT] Text as digitization [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Grant Edwards
(struggle to actually program, that is). Spend any time at all reading PHP forums and you'll despair for humanity. Not only are they trying to build airports and radios out of bamboo and twine, they don't even know how to split cane or tie a knot. -- Grant Edwards grant

Re: [OT] Dutch Reach [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Grant Edwards
e street. That may be mitigated by the high percentage of cars in US cities that have no passengers. -- Grant Edwards grant.b.edwardsYow! Hello. Just walk at along and try NOT to thi

Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-01 Thread Grant Edwards
;ve never used it). For me, google groups is nothing but a source of spam. -- Grant Edwards grant.b.edwardsYow! Let's send the at Russians defective gmail.comlifestyle accessories! -- https://mail.python.org/mailman/listinfo/python-list

Re: Trace back error just trying to run a simple import of requests

2018-02-01 Thread Grant Edwards
.@wgu.edu > > [WGU]<https://timetrade.com/app/wgu-mentoring/workflows/WGU100/schedule/?locationId=course_mentoring&appointmentTypeGroupId=CM&resourceId=005a00CBjHbAAL> > > More about WGU in Fast Company, CNN, NPR, NBC Nightly News, Money, The > Atlantic, TIME, etc.<http://

Re: Trace back error just trying to run a simple import of requests

2018-02-02 Thread Grant Edwards
On 2018-02-01, MRAB wrote: > On 2018-02-01 22:32, Grant Edwards wrote: >> On 2018-02-01, William Sewell wrote: >> >>> My python script which I run daily just blew up. So, I went into >>> python to diagnose and just typed in the first line - import >>

Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-02 Thread Grant Edwards
quite a good search (in my view). 1) Gmane's search sucked. [Using Google to search the Gmane site worked fairly well.] 2) Gmane's search and webui has been absent for years. -- Grant Edwards grant.b.edwardsYow! ... If I had heart

Re: How to work on a package

2018-02-07 Thread Grant Edwards
on a package that must remain installed and usable the whole time you're working on it? IOW, only specific test apps or apps run in a specific directory should get the "in-progress" foo module when they do an "import foo". -- Grant Edwards grant.b.edwa

Re: How to work on a package

2018-02-08 Thread Grant Edwards
On 2018-02-07, Rob Gaddi wrote: > On 02/07/2018 03:17 PM, Grant Edwards wrote: > >> How do you work on a package that must remain installed and usable the >> whole time you're working on it? >> >> IOW, only specific test apps or apps run in a specific direc

Gmane seems to be gone

2018-02-17 Thread Grant Edwards
I've been dreading this moment for a couple years: it looks like gmane.org is gone. The original operator/maintainer gave up a couple years ago and pulled the plug. Somebody else took over at that point. The Web UI was never revived, but the basic NNTP<->mailing-list gateway continue to work -- un

Re: Gmane seems to be gone

2018-02-18 Thread Grant Edwards
On 2018-02-18, Chris Green wrote: > Grant Edwards wrote: >> I've been dreading this moment for a couple years: it looks like >> gmane.org is gone. The original operator/maintainer gave up a couple >> years ago and pulled the plug. Somebody else took over at that poin

Re: Gmane seems to be gone

2018-02-18 Thread Grant Edwards
On 2018-02-18, Grant Edwards wrote: > On 2018-02-18, Chris Green wrote: >> Grant Edwards wrote: >>> I've been dreading this moment for a couple years: it looks like >>> gmane.org is gone. The original operator/maintainer gave up a couple >>> years ag

Re: Gmane seems to be gone

2018-02-18 Thread Grant Edwards
On 2018-02-18, Dennis Lee Bieber wrote: > On Sun, 18 Feb 2018 17:26:54 + (UTC), Grant Edwards > declaimed the following: > >> >>It was Yomura who picked up the archive and continued the gateway >>service a couple years ago, and they just renewed the domain for >

Re: Gmane seems to be gone

2018-02-18 Thread Grant Edwards
On 2018-02-18, Michelle Konzack wrote: > Am 2018-02-18 hackte Grant Edwards in die Tasten: > >> Does anybody have any idea what it would take to set up a private NNTP >> server that served articles from a dozen or so IMAP mailboxes? > > Where is the problem? > >

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-20 Thread Grant Edwards
he or she was running Python 2 or Python 3. Any ordinary Pythonista to deals with raw data "bytes" cares a great deal. There are major differences between the Py2 and Py3 in that area, and they're a royal PITA to deal with. -- Grant Edwards grant.b.edwa

Re: Implicit conversion to str in str.join method?

2018-02-26 Thread Grant Edwards
ful idea. PHP pulls stunts like that behind your back, and it's a huge source of bugs. -- Grant Edwards grant.b.edwardsYow! Let's all show human at CONCERN for REVERAND MOON's

Re: help me ?

2018-02-27 Thread Grant Edwards
that it technically meets the stated requirement but is so far from what the instructor wanted that they don't get credit for it (and there's no way the student will be able explain how it works to the instructor). -- Grant Edwards grant.b.edw

Re: Detection of ultrasonic side channels in mobile devices with Python?

2018-02-28 Thread Grant Edwards
rtise is completely immaterial. I miss Ludwig Plutonium. :/ -- Grant Edwards grant.b.edwardsYow! Nipples, dimples, at knuckles, NICKLES, gmail.comwrinkles, pimples!! -- https://mail.

Re: Detection of ultrasonic side channels in mobile devices with Python?

2018-02-28 Thread Grant Edwards
On 2018-03-01, Dennis Lee Bieber wrote: > The bandwidth normally used for voice grade telephone traffic is closer > to 6kHz (say 300Hz to 6.3kHz) Wow, that's pretty high -- where was that? Back when I was designing telephony electronics in US in the late 80's, POTS bandwidth was 3KHz: 300

Re: Python/New/Learn

2022-05-05 Thread Grant Edwards
On 2022-05-05, Mats Wichmann wrote: > Without having any data at all on it, just my impressions, more > people these days learn from in-person or video experiences. I've always been utterly baffled by video tutorials for programming. There must be people who prefer that format, but it seems like

Re: Python/New/Learn

2022-05-07 Thread Grant Edwards
On 2022-05-06, dn wrote: > The problem with some of the advice given in this thread, eg using > StackOverflow or YouTube videos, is that a beginner (particularly) > has no measure of the material's quality. Both platforms are riddled > with utter-junk - even 'dangerous' advice. And the "quality

Re: Changing calling sequence

2022-05-11 Thread Grant Edwards
On 2022-05-11, David Raymond wrote: > Maybe not the prettiest, but you could also define it like this, > which also wouldn't require changing of any existing calls or the > main body of the function past this if block. > > def TempsOneDay(*dateComponents): > if len(dateComponents) == 3: >

Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Grant Edwards
On 2022-05-17, Loris Bennett wrote: > It might be possible to fix the system. If will probably be fairly > difficult, but you would probably learn a lot doing it. However, if I > were you, I would just install Debian stable over your borked system and > then learn a bit more about package manag

Re: Automatic Gain Control in Python?

2022-05-29 Thread Grant Edwards
On 2022-05-29, Benjamin Schollnick wrote: > Why not just right a 3rd party package to normalize the audio levels > in the digital file? It’ll be faster, and probably easier than > trying to do it in real time… I doubt you even need to write any code to do that. Sox can normalize audio levels in

Re: Automatic Gain Control in Python?

2022-06-06 Thread Grant Edwards
On 2022-06-06, Phil Boutros wrote: > As pretty much everyone else has said. Insisting on real-time > processing of something that is itself pre-recorded is non-sensical. Downnloading a file, normalizing/compressing the volume, and then streaming the result is three lines in a bash script (assumi

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Grant Edwards
On 2022-06-09, Dennis Lee Bieber wrote: > However, the Gmane list<>NNTP gateway server DOES make the tutor > list available to news readers (unfortunately, the comp.lang.python > <> list <> Gmane has been read-only since last fall (unless things > have changed recently) so I'm stuck with the spam

Re: installing

2022-06-10 Thread Grant Edwards
On 2022-06-10, Yusuf Özdemir wrote: > ? Your question is a bit vague. -- Grant -- https://mail.python.org/mailman/listinfo/python-list

Re: "CPython"

2022-06-21 Thread Grant Edwards
On 2022-06-21, Chris Angelico wrote: > Not sure why it's strange. The point is to distinguish "CPython" from > "Jython" or "Brython" or "PyPy" or any of the other implementations. > Yes, CPython has a special place because it's the reference > implementation and the most popular, but the one thin

Re: Which linux distro is more conducive for learning the Python programming language?

2022-08-04 Thread Grant Edwards
On 2022-08-04, Turritopsis Dohrnii Teo En Ming wrote: > Subject: Which linux distro is more conducive for learning the Python > programming language? You can learn Python on any Linux distribution. First answer this question: * Whom are you going to ask for help when you run into Linux questi

Re: Which linux distro is more conducive for learning the Python programming language?

2022-08-04 Thread Grant Edwards
On 2022-08-04, Christian Heimes wrote: > Fedora is an excellent choice for Python users. Fedora 36 already comes > with Python 3.11.0b5 in its main repository. In fact you have Python > 2.7, 3.5-3.11, PyPy 2.7, PyPy 3.7-3.9, and MicroPython at your fingertips. Except that real programmers use

Re: Trying to understand nested loops

2022-08-05 Thread Grant Edwards
On 2022-08-05, GB wrote: >> BTW, there is an indentation error in your original post - line 5 >> should line up with line 4. > > As a Python beginner, I find that Python is annoyingly picky about > indents. And, the significance of indents is a bit of a minefield for > beginners. As a C begin

Re: Problem using cx_Freeze > auto-py-to-exe

2022-08-18 Thread Grant Edwards
On 2022-08-18, Chris Angelico wrote: > On Fri, 19 Aug 2022 at 04:19, David at Booomer wrote: > >> The trailing , does make commenting out arguments easier but >> unexpected coming from ‘older’ languages. ;-) > > It's one of the frustrations with JSON, since that format doesn't > allow the trailin

Re: Problem using cx_Freeze > auto-py-to-exe

2022-08-18 Thread Grant Edwards
On 2022-08-18, Chris Angelico wrote: > On Fri, 19 Aug 2022 at 05:05, Grant Edwards wrote: >> On 2022-08-18, Chris Angelico wrote: >> >> > It's one of the frustrations with JSON, since that format doesn't >> > allow the trailing comma :) >> >&g

Re: Question about learning Python

2022-09-07 Thread Grant Edwards
On 2022-09-07, Chris Angelico wrote: > On Thu, 8 Sept 2022 at 01:50, Maruful Islam wrote: >> >> I want to start learning python. I have a question about learning python. >> >> Is learning C essential or not for learning python? > > Absolutely not essential. In fact, I would strongly recommend lea

Re: Question about learning Python

2022-09-07 Thread Grant Edwards
On 2022-09-07, Chris Angelico wrote: > On Thu, 8 Sept 2022 at 04:54, Grant Edwards wrote: > >> If you're a beginning programmer, then IMO learning C first is >> probably detrimental. [...] > > Not as detrimental as starting with BASIC, and then moving on to x86 >

Can you mock a C function using ctypes?

2022-09-15 Thread Grant Edwards
I've done unit testing of C functions using ctypes, and that works nicely until you need to provide a stub/mock function to be called by the C code under test. Can that be done using ctypes? For example, I open a library that contains functon foo() where foo() calls external function bar() which

Re: Can you mock a C function using ctypes?

2022-09-15 Thread Grant Edwards
On 2022-09-15, Eryk Sun wrote: > On 9/15/22, Grant Edwards wrote: >> >> Can that be done using ctypes? >> >> For example, I open a library that contains functon foo() where foo() >> calls external function bar() which is not contained in the library. >>

Re: for -- else: what was the motivation?

2022-10-10 Thread Grant Edwards
On 2022-10-10, Chris Angelico wrote: > On Mon, 10 Oct 2022 at 11:52, MRAB wrote: >> >> On 2022-10-10 00:40, dn wrote: >> > On Sun, 9 Oct 2022 at 15:39, Axy via Python-list >> > wrote: >> > >> >> "shortest block first" >> > >> > Have never heard this advice before. Kind-of rankled with me, as it

Re: for -- else: what was the motivation?

2022-10-11 Thread Grant Edwards
On 2022-10-11, wrote: > But is that native python or some extension where "|" has been modified to > mean something other than a form of OR in some places? The latter. > What module do you need to load to make that happen? The provided link is for a page that shows the module and explains the

Re: Find the path of a shell command

2022-10-12 Thread Grant Edwards
On 2022-10-12, 2qdxy4rzwzuui...@potatochowder.com <2qdxy4rzwzuui...@potatochowder.com> wrote: > On 2022-10-12 at 17:43:18 +0100, Paulo da Silva > wrote: >> >> > Probably you could use os.unlink[1] with no problem. >> >> No, because I need to launch several rm's that keep running after the script

Re: for -- else: what was the motivation?

2022-10-15 Thread Grant Edwards
On 2022-10-12, Rob Cliffe via Python-list wrote: > I too have occasionally used for ... else.  It does have its uses. But > oh, how I wish it had been called something else more meaningful, > whether 'nobreak' or whatever. I use it a few times year. I have to look it up in the documentation eve

Re: Find the path of a shell command

2022-10-17 Thread Grant Edwards
On 2022-10-15, Andreas Eder wrote: > On Mi 12 Okt 2022 at 05:00, Paulo da Silva > wrote: > >> The simple question: How do I find the full path of a shell command >> (linux), i.e. how do I obtain the corresponding of, for example, >> "type rm" in command line? >> >> The reason: >> I have python p

Re: FTP without username and password

2022-12-06 Thread Grant Edwards
On 2022-12-06, ^Bart wrote: >> In general, "anonymous FTP" is done technically with a username and >> password. Can you look at how the device tries to connect, and then >> make that username (probably "anonymous") and that password (could be >> anything, traditionally was an email address) valid

Re: FTP without username and password

2022-12-07 Thread Grant Edwards
On 2022-12-07, Dennis Lee Bieber wrote: > It's a whole different protocol. TFTP is simplified to the point it > will fit on embedded devices which don't need security (the > assumption being that one has the embedded device physically > present, FTP assumes distributed networks). One of the big

Re: Does one have to use curses to read single characters from keyboard?

2022-12-12 Thread Grant Edwards
On 2022-12-11, Chris Green wrote: > Is the only way to read single characters from the keyboard to use > curses.cbreak() or curses.raw()? No. > If so how do I then read characters, Use a termios.tcsetattr() to put fd 0 into raw mode and then use os.read(). Recent versions of Python include a

Re: Single line if statement with a continue

2022-12-15 Thread Grant Edwards
On 2022-12-15, MRAB wrote: > A problem with having a single return is that it can lead to excessive > indentation: > > if test_1: > ... > > if test_2: > ... > > if test_3: > ... > > return I sometimes have to work on code li

Re: String to Float, without introducing errors

2022-12-17 Thread Grant Edwards
On 2022-12-17, Chris Angelico wrote: >> It was the rounding rounding error that I needed to avoid (as Peter >> J. Holzer suggested). The use of decimal solved it and just in >> time. I was about to truncate the number, get each of the >> characters from the string mantissa, and then do something

Re: Fwd: Installation hell

2022-12-19 Thread Grant Edwards
On 2022-12-19, Chris Angelico wrote: > So much easier to do on a Unix-like system, where you don't need to > concern yourself with "effective drive" and can simply use relative > paths. I know we're not here to bash Windows, but... drive letters > really need to just die already. They needed to

Re: NoneType List

2023-01-02 Thread Grant Edwards
On 2023-01-02, wrote: > I used PASCAL before C and I felt like I was wearing a straitjacket at times > in PASCAL when I was trying to write encryption/decryption functions and had > to find ways to fiddle with bits. Similar things were easy in C, and are > even easier in many more recent languag

Re: NoneType List

2023-01-02 Thread Grant Edwards
On 2023-01-02, Alan Gauld wrote: > On 02/01/2023 02:14, avi.e.gr...@gmail.com wrote: >> I used PASCAL before C and I felt like I was wearing a straitjacket at times >> in PASCAL when I was trying to write encryption/decryption functions and had >> to find ways to fiddle with bits. Similar things w

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Grant Edwards
On 2023-01-03, Michael Torrie wrote: > On 1/3/23 11:45, Keith Thompson wrote: >> MRAB writes: >> [...] >>> The purpose of stderr is to display status messages, logging and error >>> messages, even user prompts, and not mess up the program's actual >>> output. This is important on a *nix system w

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Grant Edwards
On 2023-01-04, Chris Angelico wrote: > On Wed, 4 Jan 2023 at 09:52, Grant Edwards wrote: >> >>> I can't think of a specific example, but I know I have piped the output >>> of a program while at the same time interacting with a prompt on stderr. >>> A ra

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Grant Edwards
On 2023-01-05, Thomas Passin wrote: > The logging system is so configurable that... I find it almost impossible to use unless I copy a working example I find somewhere. ;) I'm not at all surprised that the OP didn't understand how it works. I've been writing Python programs for over 20 years, a

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Grant Edwards
On 2023-01-05, Weatherby,Gerard wrote: > logging.basicConfig() > logging.info(“Nice to know”) > logging.debug(“Details for when things are funky”) > logging.warn(“Trouble is brewing”) I always seem to need something slightly more complex. Usually something like: * Specify a log level on the com

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-23 Thread Grant Edwards
On 2023-01-22, Weatherby,Gerard wrote: > Argparse is for parsing command line arguments and options. > > If you just want to evaluate an Python expression, use eval( ) Only use eval() if the expression is always under your control (and you don't make mistakes when typing). Don't use eval() on st

Re: bool and int

2023-01-24 Thread Grant Edwards
On 2023-01-25, Mike Baskin via Python-list wrote: > Will all of you please stop sending me emails Oh dear. You might want to try unsubscribing from the list. Telling everybody to stop using the mailing list and newsgroup is a bit silly. -- Grant -- https://mail.python.org/mailman/listinfo/py

Re: HTTP server benchmarking/load testing in Python

2023-01-26 Thread Grant Edwards
On 2023-01-26, Thomas Passin wrote: > On 1/25/2023 7:38 PM, Peter J. Holzer wrote: >> On 2023-01-25 16:30:56 -0500, Thomas Passin wrote: >>> Great! Don't forget what I said about potential overheating if you >>> hit the server with as many requests as it can handle. >> >> Frankly, if you can ove

Re: asyncio questions

2023-01-26 Thread Grant Edwards
On 2023-01-26, Frank Millman wrote: > I have written a simple HTTP server using asyncio. It works, but I don't > always understand how it works, I thought that was the rule with asyncio. ;) -- https://mail.python.org/mailman/listinfo/python-list

Re: HTTP server benchmarking/load testing in Python

2023-01-26 Thread Grant Edwards
On 2023-01-26, Thomas Passin wrote: > On 1/26/2023 11:02 AM, Grant Edwards wrote: > >[...] > >> A properly designed laptop with a non-broken OS will not overheat >> regardless of the computing load you throw at it. The fan might get >> annoying loud, but if it overhe

Re: bool and int

2023-01-27 Thread Grant Edwards
On 2023-01-27, Mark Bourne wrote: > So Python is even flexible enough to be made to deal with insane > situations where False is 2! IIRC, in VMS DCL even numbers were false and odd numbers were true. In Unix shells, a return code of 0 is true and non-0 is false. Though that's not really the s

Re: Usenet vs. Mailing-list

2023-01-30 Thread Grant Edwards
On 2023-01-28, Chris Green wrote: > As far as I am aware the mirroring of the Python mailing list on > comp.lan.python works perfectly. I love gmane! :-) If gmane stopped working, I'd have to retire and give up on computers. I supposed I might be able to hammer procmail and mutt into something

Re: Usenet vs. Mailing-list

2023-01-30 Thread Grant Edwards
On 2023-01-28, Dennis Lee Bieber wrote: > On Sat, 28 Jan 2023 20:07:44 +, Chris Green declaimed the > following: > > >>As far as I am aware the mirroring of the Python mailing list on >>comp.lan.python works perfectly. I love gmane! :-) > > Is gmane's gmane.comp.python.general allowing

Re: Usenet vs. Mailing-list

2023-01-31 Thread Grant Edwards
On 2023-01-31, Anssi Saari wrote: > Grant Edwards writes: > >> No. FWIW, it's the mailing list that's blocking them, not Gmane. >> >> That's why I wrote this: >> >> https://github.com/GrantEdwards/hybrid-inews >> >> It's a

Re: Usenet vs. Mailing-list (was: evaluation question)

2023-01-31 Thread Grant Edwards
On 2023-01-31, Alan Gauld wrote: > On 28/01/2023 21:36, Dennis Lee Bieber wrote: > >> Now -- last time I checked the gmane server says posting is prohibited. >> I used to use gmane as it retrieved directly from the mailing list > > I still use gmane but its no posting thing is a pain because

Re: evaluation question

2023-01-31 Thread Grant Edwards
On 2023-01-31, Greg Ewing wrote: > That's only one of the syntactic oddities of the old print > statement, thogh. There was also the >> thing, special treatment > of trailing commas, etc. In "old" Python I used to use the trailing comma extensively, but I could never get myself to use the >> thi

Re: Upgrading Python on Ubuntu 22.04.1 LTS

2023-02-01 Thread Grant Edwards
On 2023-02-01, אורי wrote: > I have a server with Ubuntu 22.04.1 LTS and the Python version there > is Python 3.10.6. Is there a safe way to upgrade to the latest version of > Python 3.10 (3.10.9)? I tried with the OS update and upgrade but the Python > version remained the same. This is an Ubun

Re: evaluation question

2023-02-01 Thread Grant Edwards
On 2023-02-01, mutt...@dastardlyhq.com wrote: > >>No, but it was decided that Python 3 would have to be backwards >>incompatible, mainly to sort out the Unicode mess. Given that, >>the opportunity was taken to clean up some other mistakes as well. > > Unicode is just a string of bytes. No it isn'

Re: evaluation question

2023-02-01 Thread Grant Edwards
On 2023-02-01, Peter J. Holzer wrote: > On 2023-02-01 09:00:39 -, mutt...@dastardlyhq.com wrote: >> Its not evolution, its revolution. Evolution retains old functionality. > > Tell a penguin that it can fly :-) Penguins can fly. They just do it underwater... -- https://mail.python.org/mail

Re: Precision Tail-off?

2023-02-17 Thread Grant Edwards
On 2023-02-17, Richard Damon wrote: > [...] > >> Perhaps this observation should be brought to the attention of the IEEE. I >> would like to know their response to it. > > That is why they have developed the Decimal Floating point format, to > handle people with those sorts of problems. > > They

Re: Precision Tail-off?

2023-02-17 Thread Grant Edwards
On 2023-02-17, Mats Wichmann wrote: > And... this topic as a whole comes up over and over again, like > everywhere. That's an understatement. I remember it getting rehashed over and over again in various USENET groups 35 years ago when when the VAX 11/780 BSD machine on which I read news exchan

Re: semi colonic

2023-02-23 Thread Grant Edwards
On 2023-02-23, rbowman wrote: > On Wed, 22 Feb 2023 18:25:00 -0800 (PST), Hen Hanna wrote: > >> i sometimes put extra commas... as: >> >>[ 1, 2, 3, 4, ] >> >> so it is (or may be) easier to add things later. > > That can bite you with things like JS

Re: Not receiving posts

2023-02-23 Thread Grant Edwards
On 2023-02-23, Jim Byrnes wrote: > I have been reading the python-list for some time now. At first via > gemane and since it's demise via a subscription. FWIW, gmane is still there, and still working fine. I read this list by pointing slrn at news.gmane.io For whatever reason, python-list deci

Re: Not receiving posts

2023-02-24 Thread Grant Edwards
On 2023-02-24, Mats Wichmann wrote: > On 2/23/23 13:56, Grant Edwards wrote: >> On 2023-02-23, Jim Byrnes wrote: >> >>> I have been reading the python-list for some time now. At first via >>> gemane and since it's demise via a subscription. >> >

Re: Rob Cliffe should stop sending me rude email messages.

2023-02-27 Thread Grant Edwards
On 2023-02-27, Michael Torrie wrote: > I've been putting off sending this message for days, but the list noise > level is now to the point that it has to be said. Ah, I've finially realized why some of those threads have seemed so disjointed to me. Years ago, I plonked all posts which are (like

Re: How to escape strings for re.finditer?

2023-03-01 Thread Grant Edwards
On 2023-02-28, Cameron Simpson wrote: > Regexps are: > - cryptic and error prone (you can make them more readable, but the >notation is deliberately both terse and powerful, which means that >small changes can have large effects in behaviour); the "error prone" >part does not mean

Re: How to escape strings for re.finditer?

2023-03-02 Thread Grant Edwards
On 2023-03-02, Peter J. Holzer wrote: > [1] Personally I'd say you shouldn't use Outlook if you are reading > mails where line breaks (or other formatting) is important, but ... I'd shorten that to "You shouldn't use Outlook if mail is important." -- https://mail.python.org/mailman/listin

Re: Testing list sequence question -- thanks for the info

2023-03-05 Thread Grant Edwards
On 2023-03-05, Gabor Urban wrote: > Upgrading our Python to 3.7 seems to be out of question at the moment. Using an OrderedDict doesn't work for you? -- Grant -- https://mail.python.org/mailman/listinfo/python-list

Baffled by readline module

2023-03-09 Thread Grant Edwards
In an interactive command-line Python program on Linux, I want to be able to read a line at a time from stdin, providing command line history and editing to the user. In C, I would use GNU readline to do that. Python has the readline module, which appears to be a wrapper for GNU readline. However,

Re: Baffled by readline module

2023-03-09 Thread Grant Edwards
On 2023-03-09, Grant Edwards wrote: > In an interactive command-line Python program on Linux, I want to be > able to read a line at a time from stdin, providing command line > history and editing to the user. In C, I would use GNU readline to do > that. > > Python has the read

Re: Baffled by readline module

2023-03-09 Thread Grant Edwards
On 2023-03-09, Chris Angelico wrote: > Not sure about the history file, and I would assume that if you don't > configure one, history is simply lost when you restart. But with tab > completion, unless you need to be able to input a tab character, it > should be safe to ignore the feature and leav

Re: Baffled by readline module

2023-03-09 Thread Grant Edwards
On 2023-03-09, Cameron Simpson wrote: > [...] >>It finally dawned on me after seeing an example I found elsewhere that >>you don't call some module method to fetch the next user-entered line. >> >>You call the input() built-in. > > Ah. That's not overtly stated? [...reads...] Ah, there it is in t

Re: Baffled by readline module

2023-03-09 Thread Grant Edwards
On 2023-03-09, Grant Edwards wrote: > On 2023-03-09, Cameron Simpson wrote: > >> [...] >>>It finally dawned on me after seeing an example I found elsewhere that >>>you don't call some module method to fetch the next user-entered line. >>> >>&g

Re: Baffled by readline module

2023-03-09 Thread Grant Edwards
On 2023-03-09, Chris Angelico wrote: > On Fri, 10 Mar 2023 at 10:04, Grant Edwards wrote: > >> Yeesh. What's _really_ embarassing is that I just stumbled across a >> small test program with which I had apparently figured this out >> 10-12 years ago. Must be ab

Re: Baffled by readline module

2023-03-09 Thread Grant Edwards
On 2023-03-10, Greg Ewing via Python-list wrote: > On 10/03/23 10:08 am, Grant Edwards wrote: >> It finally dawned on me after seeing an example I found elsewhere that >> you don't call some module method to fetch the next user-entered line. >> >> You call the i

Re: Baffled by readline module

2023-03-09 Thread Grant Edwards
On 2023-03-10, 2qdxy4rzwzuui...@potatochowder.com <2qdxy4rzwzuui...@potatochowder.com> wrote: > On 2023-03-10 at 12:57:48 +1100, > Chris Angelico wrote: > >> On Fri, 10 Mar 2023 at 12:56, Greg Ewing via Python-list >> wrote: >> > >> > On 10/03/23 1:

Re: Baffled by readline module

2023-03-10 Thread Grant Edwards
On 2023-03-10, Weatherby,Gerard wrote: > I would say, “No, readline is not the right tool.” > > cmd.Cmd is: https://docs.python.org/3/library/cmd.html. I have a > couple of cmd.Cmd modules, one of which I use daily and the other > weekly. I'll have to remember that one. It doesn't really fit my

Re: Baffled by readline module

2023-03-10 Thread Grant Edwards
On 2023-03-10, Weatherby,Gerard wrote: > On our Linux systems, I can up-arrow to go back to prior commands > and use the left and right arrows to navigate a line. The > functionality may be provided internally by readline. I’ve never had > to dig into it because it meets my needs out of the box.

Re: Baffled by readline module

2023-03-10 Thread Grant Edwards
On 2023-03-10, Cameron Simpson wrote: > On 10Mar2023 09:12, Grant Edwards wrote: >>On 2023-03-10, Weatherby,Gerard wrote: >>> On our Linux systems, I can up-arrow to go back to prior commands >>> and use the left and right arrows to navigate a line. The >&g

Re: Friday finking: IDE 'macro expansions'

2023-03-16 Thread Grant Edwards
On 2023-03-16, Thomas Passin wrote: > In general, I don't like a lot of popups and code completions, so I > tend to avoid them. I don't even like automatic parens or brace > insertion. I _hate_ it when the "editor" decides to insert stuff I didn't type. There's an html editor I use occasionally

Re: What kind of "thread safe" are deque's actually?

2023-03-27 Thread Grant Edwards
On 2023-03-28, Travis Griggs wrote: > A while ago I chose to use a deque that is shared between two threads. I did > so because the docs say: > > "Deques support thread-safe, memory efficient appends and pops from > either side of the deque with approximately the same O(1) > performance in either

Re: Standard class for time *period*?

2023-03-28 Thread Grant Edwards
On 2023-03-28, Dennis Lee Bieber wrote: > So far, you seem to be the only person who has ever asked for a > single entity incorporating an EPOCH (datetime.datetime) + a > DURATION (datetime.timedelta). It seems to me that tuple of two timdate objects (start,end) is the more obvious representatio

<    1   2   3   4   5   6   7   8   9   10   >