Re: How/where to store calibration values - written by program A, read by program B

2023-12-28 Thread rbowman via Python-list
On Wed, 27 Dec 2023 03:53:42 -0600, Greg Walters wrote: > The biggest caveat is that the shared variable MUST exist before it can > be examined or used (not surprising). There are a few other questions. Let's say config.py contains a variable like 'font' that is a user set preference or a

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-25 Thread rbowman via Python-list
On Sun, 24 Dec 2023 22:55:34 +, Barry wrote: >> On 24 Dec 2023, at 00:54, rbowman via Python-list >> wrote: >> >> Does that work with virtualenv or conda? I'm slowly getting up to speed >> with those. > > Conda is its own thing, not need for py.exe. >

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-23 Thread rbowman via Python-list
On Fri, 22 Dec 2023 17:27:58 -0700, Michael Torrie wrote: > Using the py launcher as your Windows association with .py and.pyw files > you can have multiple versions of python installed and everything works > as it should, according to your shebang, just like on Unix. Does that work with

Re: Checking if email is valid

2023-11-06 Thread rbowman via Python-list
On Tue, 7 Nov 2023 12:11:18 +1300, Greg Ewing wrote: > On 6/11/23 6:34 pm, rbowman wrote: >> We've found even if you directly ask the user often the answer is 'I >> dunno' or some mythology they have constructed to explain the problem. > > This seems to apply to hardware

Re: Checking if email is valid

2023-11-06 Thread rbowman via Python-list
On Sun, 5 Nov 2023 19:22:49 -0600, D'Arcy Cain wrote: > Gotta wonder for sure. It could also be the case of programmers > depending on user input but the users insist on living with the bugs > and/or working around them. We made crash reporting dead simple to > report on and still users didn't

Re: Looking for package/library to extract MP4 metadata

2023-04-10 Thread rbowman
On Sun, 9 Apr 2023 20:19:37 +0100, Chris Green wrote: > That's why I hadn't thought it would help me as I'm after getting > metadata from an MP4 video file but I guess the metadata format may be > the same regardless of whether it's video or audio. If yuo chase back through the various ISOs you

Re: Looking for package/library to extract MP4 metadata

2023-04-10 Thread rbowman
On Sun, 9 Apr 2023 09:40:51 +0100, Chris Green wrote: > I'm looking for a Python (3) library to access (read only at present) > the metadata in MP4 video files, in particular I want to get at dates > and times. > > What's available to do this? Ideally something available in the Ubuntu >

Re: Windows Gui Frontend

2023-04-03 Thread rbowman
On Sun, 2 Apr 2023 19:52:05 +0200, Dietmar Schwertberger wrote: > On 02.04.2023 18:20, Michael Torrie wrote: >>> Well the thing is you don't need to generate Python code at all. Qt >>> provides a UI loader class that loads the UI file at run time, builds >>> the objects in memory, and connects

Re: Windows Gui Frontend

2023-04-03 Thread rbowman
On Sun, 02 Apr 2023 13:50:45 -0700 (PDT), Grant Edwards wrote: > On 2023-04-02, Michael Torrie wrote: >> On 4/2/23 05:09, Dietmar Schwertberger wrote: >>> I also did evaluate all the GUI builder from time to time between 2000 >>> and 2016 to find one that I could recommend to colleagues, but

Re: Windows Gui Frontend

2023-04-03 Thread rbowman
On Sat, 1 Apr 2023 19:19:17 -0600, Michael Torrie wrote: > Qt's commerical licensing is very hostile to small companies, I can say > that much. It's too bad really. But the LGPL will work for most > companies, except for those that might wish to use the embedded version, > such as in cars

Re: Windows Gui Frontend

2023-04-03 Thread rbowman
On Sat, 1 Apr 2023 10:37:34 -0500, Eryk Sun wrote: > On 4/1/23, Jim Schwartz wrote: >> I have another question. I have an app written in python, but I want >> to add a windows GUI front end to it. Can this be done in python? >> What packages would allow me to do that? > > Here are a few of

Re: Standard class for time *period*?

2023-03-28 Thread rbowman
On Tue, 28 Mar 2023 15:11:14 +0200, Loris Bennett wrote: > But even if I have a single epoch, January 2022 is obviously different > to January 2023, even thought the duration might be the same. I am just > surprised that there is no standard Period class, with which I could > create objects and

Re: Standard class for time *period*?

2023-03-27 Thread rbowman
On Mon, 27 Mar 2023 15:00:52 +0200, Loris Bennett wrote: > I need to deal with what I call a 'period', which is a span of time > limited by two dates, start and end. The period has a 'duration', > which is the elapsed time between start and end. The duration is > essentially a number

Re: =- and -= snag

2023-03-14 Thread rbowman
On Tue, 14 Mar 2023 22:15:34 GMT, Gilmeh Serda wrote: > On Mon, 13 Mar 2023 22:26:20 +0100, Morten W. Petersen wrote: > >> numbers for calculations didn't add up. It went into negative numbers, >> when that shouldn't have been possible. > > We have all written code that makes us wonder why the

Re: Fast full-text searching in Python (job for Whoosh?)

2023-03-07 Thread rbowman
On Tue, 7 Mar 2023 07:33:01 -0500, Dino wrote: > Played a little bit with both approaches in my little application. > Re-requesting from the server seems to win hands down in my case. That's necessary for a non-trivial data set. Assume you get 10 suggestions after the user type 'to'. today

Re: Fast full-text searching in Python (job for Whoosh?)

2023-03-06 Thread rbowman
On Mon, 6 Mar 2023 21:55:37 -0500, Dino wrote: > ne issue that was also correctly foreseen by some is that there's going > to be a new request at every user key stroke. Known problem. JavaScript > programmers use a trick called "debounceing" to be reasonably sure that > the user is done typing

Re: Fast full-text searching in Python (job for Whoosh?)

2023-03-06 Thread rbowman
On Mon, 6 Mar 2023 07:40:29 -0500, Dino wrote: > The idea that someone types into an input field and matches start > dancing in the browser made me think that this was exactly what I > needed, and hence I figured that asking here about Whoosh would be a > good idea. I know realize that Whoosh

Re: Fast full-text searching in Python (job for Whoosh?)

2023-03-06 Thread rbowman
On Mon, 6 Mar 2023 15:32:09 +, Weatherby,Gerard wrote: > Increased performance may be achieved by building dictionaries “aa”,”ab” > ... “zz. And so on. Or a trie. There have been several implementations but I believe this is the most active: https://pypi.org/project/PyTrie/ --

Re: Python 3.10 Fizzbuzz

2023-03-01 Thread rbowman
On 1 Mar 2023 11:28:12 GMT, Stefan Ram wrote: > IIRC, I've heard of professional video monitors which are set to > standard values for color saturation, contrast, and brightness. They > have no way to adjust these values, although they are more expensive > than normal screens. Probably

Re: Python 3.10 Fizzbuzz

2023-02-27 Thread rbowman
On Mon, 27 Feb 2023 11:08:22 -0500, Thomas Passin wrote: > I prefer single quotes because they are easier to type. There is that. JavaScript makes me lazy and C# slaps my knuckles with a steel edged ruler. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.10 Fizzbuzz

2023-02-27 Thread rbowman
On Mon, 27 Feb 2023 09:01:26 -0700, Mats Wichmann wrote: > If you intend to run Black on your code to ensure consistent formatting, > you may as well learn to prefer double quotes, because it's going to > convert single to double (or: don't learn, and set your IDE to "convert > on save" and

Re: Vim (To move text-Lines between files) ___ :ab wt w! ~/temp.vi ___ :ab rt r ~/temp.vi

2023-02-26 Thread rbowman
On Sun, 26 Feb 2023 09:17:46 -0800 (PST), Hen Hanna wrote: > To move text-Lines between files --- i do this (below) Maybe > there's a better (or more standard) way, but i've been doing this for > 30+ years, so i'll prob. keep doing it. > You can use the buffers. "a yy will add the

Re: semi colonic

2023-02-23 Thread rbowman
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 JSON that aren't very forgiving. The

Re: Python + Vim editor

2023-02-21 Thread rbowman
On Tue, 21 Feb 2023 18:00:20 -0800 (PST), Hen Hanna wrote: > what editor do you (all) use to write Python code? (i use Vim) I've used vim (gvim to be precise) for years and that has been my editor of choice for Python. Lately I've been using Spyder. As background, most of my Python work is

Re: evaluation question

2023-02-03 Thread rbowman
On Thu, 2 Feb 2023 16:09:09 - (UTC), Muttley wrote: > What if its not a few scripts? What if its 10s of thousands of lines of > core production code? If the company it belongs to wants to add new > Python 3 features it can't just plug them into the code because it won't > run under Python 3,

Re: evaluation question

2023-02-02 Thread rbowman
On Thu, 2 Feb 2023 09:31:46 - (UTC), Muttley wrote: > Yeah ok But the ancestors of penguins didn't wake up one morning, flap > their wings and fall out the tree, it happened gradually. Python2 syntax > could have been retained for X versions of 3 just as C++ keeps old stuff > until its

Re: evaluation question

2023-02-01 Thread rbowman
On 1 Feb 2023 17:31:02 GMT, Stefan Ram wrote: > rbowman writes: >> Why does every language have to invent their own function to >>print to the console that is very similar but not the same as the rest >>of the herd? > > Why do there have to be differe

Re: evaluation question

2023-02-01 Thread rbowman
On Wed, 1 Feb 2023 08:56:40 - (UTC), Muttley wrote: > Why couldn't they just keep "print" and call the function , oh I dunno, > "printf" ? Why does every language have to invent their own function to print to the console that is very similar but not the same as the rest of the herd? --

Re: bool and int

2023-01-28 Thread rbowman
On Fri, 27 Jan 2023 21:35:11 -0800 (PST), Grant Edwards wrote: > In Unix shells, a return code of 0 is true and non-0 is false. That carries over to some C functions like strcmp() although it's more complex. strcmp() returns the value of subtracting the nth character of string b from string a

Re: bool and int

2023-01-26 Thread rbowman
On Thu, 26 Jan 2023 04:10:30 +1100, Chris Angelico wrote: > BASIC was like that too, although it (at least, the versions I used in > my childhood) didn't have "True" and "False", you just got the actual > values -1 and 0. They were the other way around compared to what you're > saying here

Re: bool and int

2023-01-25 Thread rbowman
On Wed, 25 Jan 2023 06:53:44 -0500, 2QdxY4RzWzUUiLuE wrote: > They used Java at my last job (as in, the last job I had before I > retired), and it was absolutely awful, for any number of reasons, the > gymnastics (on many levels) required to support "primitive types" being > one of them. My

Re: bool and int

2023-01-24 Thread rbowman
On Wed, 25 Jan 2023 12:14:50 +1100, Chris Angelico wrote: > So the problem isn't that I'm trying to write Python in C#, but that I'm > trying to write code that would work on pretty much *any other C-family > language*, but doesn't work on C#. I could use those techniques in > plenty of

Re: bool and int

2023-01-24 Thread rbowman
On Mon, 23 Jan 2023 23:22:00 -0500, Dino wrote: > $ python Python 3.8.10 (default, Mar 15 2022, 12:22:08) > [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" > for more information. > >>> b = True isinstance(b,bool) > True > >>> isinstance(b,int) > True > >>> > >>> > WTF!

Re: IDLE "Codepage" Switching?

2023-01-17 Thread rbowman
On Tue, 17 Jan 2023 12:47:29 +, Stephen Tucker wrote: > 2. Does the IDLE in Python 3.x behave the same way? fwiw Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license()" for more information. str = "" for c in range(157, 169):

Re: Fast lookup of bulky "table"

2023-01-16 Thread rbowman
On Mon, 16 Jan 2023 12:28:37 -0500, Thomas Passin wrote: > On 1/16/2023 11:56 AM, rbowman wrote: >> On 16 Jan 2023 15:14:06 GMT, Stefan Ram wrote: >> >> >>>When none of those reasons matter, one can use dictionaries in >>>Python as well. And then

Re: Fast lookup of bulky "table"

2023-01-16 Thread rbowman
On 16 Jan 2023 15:14:06 GMT, Stefan Ram wrote: > When none of those reasons matter, one can use dictionaries in Python > as well. And then what Chandler Carruth showed us applies: I am missing something. Where is the data in your dictionary coming from? --

Re: Fast lookup of bulky "table"

2023-01-15 Thread rbowman
On Sun, 15 Jan 2023 08:27:29 -0500, Dino wrote: > Do you have any idea about the speed of a SELECT query against a 100k > rows / 300 Mb Sqlite db? https://www.sqlite.org/speed.html The site is old but has a number of comparisons. I have not used SQLite with Python yet but with both C and C#

Re: NoneType List

2023-01-02 Thread rbowman
On Mon, 02 Jan 2023 13:59:03 -0800 (PST), Grant Edwards wrote: > Yonks ago (early 80s), I used Pascal to write an RTOS kernel and call > processing firmware for a cell-site radio running a 16-bit > microprocessor (Z8000). It worked great. However, that Pascal compiler > had a few extensions

Re: String to Float, without introducing errors

2022-12-18 Thread rbowman
On Sun, 18 Dec 2022 11:14:28 -0500, Dennis Lee Bieber wrote: > .. And maybe lament the days when a 3-digit result was acceptable in > math class -- being the typical capability in reading a standard (10" > scale) slide rule. Arguably more thought was given to what those three digits meant in the

Re: New computer, new Python

2022-12-09 Thread rbowman
On Fri, 9 Dec 2022 12:13:16 -0500 (EST), ker...@polaris.net wrote: > How can I write my own Python Functions and subroutines in the new > Python? Personally, I would go with VS Code: https://learn.microsoft.com/en-us/training/modules/python-install-vscode/ It supports virtual environments

Re: NEO6 GPS with Py PICO with micropython

2022-11-29 Thread rbowman
On Tue, 29 Nov 2022 17:23:31 +0530, KK CHN wrote: > When I ran the program I am able to see the output of latitude and > longitude in the console of thony IDE. But between certain intervals > of a few seconds I am getting the latitude and longitude data ( its > printing GPS data not found ??

Re: need help

2022-10-23 Thread rbowman
On Mon, 24 Oct 2022 10:02:10 +1100, Cameron Simpson wrote: > I'd say GMail are rudely dropping traffic to port 2525. Maybe try just > 25, > the normal SMTP port? 2525 is an alternative to 587, the standard TLS port. 25 and 587 work. telnet smtp.gmail.com 587 Trying 2607:f8b0:4023:1004::6d...

Re: Python For TinyML

2022-10-23 Thread rbowman
On Sun, 23 Oct 2022 08:46:10 -0700 (PDT), Kisakye Moses wrote: > Hello am a (M) and glad that I've joined this group. > Any help in python for TinyML, i will honored https://tinynet.autoai.org/en/latest/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Find the path of a shell command

2022-10-12 Thread rbowman
On 10/12/22 09:06, Chris Green wrote: Michael F. Stemper wrote: On 12/10/2022 07.20, Chris Green wrote: jak wrote: Il 12/10/2022 09:40, jkn ha scritto: On Wednesday, October 12, 2022 at 6:12:23 AM UTC+1, jak wrote: I'm afraid you will have to look for the command in every path listed in

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

2022-10-10 Thread rbowman
On 10/8/22 22:37, Axy wrote: Python is awesome because it's semantic is clear for the majority, but there are places that look odd. In case of "for", "else" looks logically tied with "for" clause, but actually it is not. It's tied with "break" statement and I overlooked that even after

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

2022-10-08 Thread rbowman
On 10/7/22 21:32, Axy wrote: So, seriously, why they needed else if the following pieces produce same result? Does anyone know or remember their motivation? In real scenarios there would be more logic in the for block that would meet a condition and break out of the loop. If the condition is

Re: python developer

2022-10-01 Thread rbowman
On 9/30/22 22:07, Mike Dewhirst wrote: Most email activists demand end-to-end encryption and obviously signing email is part of that. However, my view is that email privacy, while very important, is an oxymoron. If you need encrypted messages you would never use email. You would meet under a

Re: the python name

2019-01-07 Thread rbowman
On 01/07/2019 02:10 PM, DL Neil wrote: Why is that obscure? It makes perfect sense - to those of us who have used tape/serial storage! Perhaps less-so to [bobble-heads], sorry I mean people who grew-up with 'bubble memory' (Memory sticks, 'flash drives', SSDs). In point-of-fact, Python Context

Re: Recommendations for a novice user.

2019-01-06 Thread rbowman
On 01/02/2019 05:14 AM, Hüseyin Ertuğrul wrote: I don't know the software language at all. What do you recommend to beginners to learn Python. What should be the working systematic? How much time should I spend every day or how much time should I spend on a daily basis. As much time as you

Re: the python name

2019-01-06 Thread rbowman
On 01/04/2019 10:45 AM, Peter J. Holzer wrote: FORTRAN is older than most of us. So it influenced what we think a computer language should sound like. Sadly, not for all of us... FORTRAN seeded later languages with terms that are obscure, like rewind(). A blazing powerhouse like the IBM

Re: the python name

2019-01-06 Thread rbowman
On 01/03/2019 05:31 PM, Avi Gross wrote: Why did I mention Anaconda? Because python is also the name of a snake and some people considered it appropriate to name their pet project that includes python, as the name of another snake: Probably not politically correct to mention but Colt had seven

Re: the python name

2019-01-06 Thread rbowman
On 01/03/2019 09:53 PM, DL Neil wrote: Thus the OP's original assumption/confusion between a programming language and a serpent; Java and a large island; right down to C, R, etc which are too short to be usable search terms in most engines. C# wins the prize for not getting what you expect in

Re: the python name

2019-01-06 Thread rbowman
On 01/04/2019 11:17 AM, Dennis Lee Bieber wrote: One would turn in a deck of cards to be spooled in the job queue, and come back some hours later to get the printout from the job. Or, in most cases, obscure compiler errors because you forget the continuation punch in column 6. Back to the

Re: the python name

2019-01-06 Thread rbowman
On 01/04/2019 09:34 AM, Avi Gross wrote: Although I used FORTRAN ages ago and it still seems to be in active use, I am not clear on why the name FORMULA TRANSLATOR was chosen. I do agree it does sound more like a computer language based on both the sound and feel of FORTRAN as well as the

Re: the python name

2019-01-06 Thread rbowman
On 01/04/2019 09:06 AM, William Ray Wing wrote: On 3/01/19 2:03 PM, Avi Gross wrote: Challenge: Can we name any computer language whose name really would suggest it was a computer language? I think the name is the least important aspect of a computer language. I’d like to propose that

Re: the python name

2019-01-06 Thread rbowman
On 01/03/2019 10:08 PM, Stefan Ram wrote: DL Neil writes: Thus the OP's original assumption/confusion between a programming language and a serpent; Java and a large island; right down to C, R, etc which are too short to be usable search terms in most engines. And still, you enter "Ant"

Re: the python name

2019-01-06 Thread rbowman
On 01/03/2019 01:28 PM, Grant Edwards wrote: On 2019-01-03, Gene Heskett wrote: Do I miss-remember that there was an anaconda language at sometime in the past? Not long after python made its debute? I've not see it mentioned in a decade so maybe its died? About 20 years ago, the RedHat

Re: the python name

2019-01-06 Thread rbowman
On 01/03/2019 12:40 PM, Gene Heskett wrote: Do I miss-remember that there was an anaconda language at sometime in the past? Not long after python made its debute? I've not see it mentioned in a decade so maybe its died? Very alive and well... https://www.anaconda.com/what-is-anaconda/ It's

Re: the python name

2019-01-06 Thread rbowman
On 01/03/2019 09:53 AM, Avi Gross wrote: Bad analogy, but snakes do tend to shed their skin periodically as they grow. 3.x certainly was a snake shedding its skin. ESRI moved to 3 for the cloud oriented products but their non-cloud products are still 2.7 and that's the world I live in.

Re: the python name

2019-01-06 Thread rbowman
On 01/03/2019 07:59 AM, Jack Dangler wrote: Odd that COBOL (Common Business Oriented Language) and DIBOL (Digital Business Oriented Language) follow the paradigm, but SNOBOL went with "symBOlic"... I vaguely remember it as being sort of an inside joke vis a vis COBOL. --

Re: the python name

2019-01-06 Thread rbowman
On 01/02/2019 06:03 PM, Avi Gross wrote: A Programming Language? APL. A company I worked for bought an IBM 5120, not to be confused with the later 51xx PC's. It shipped with BASIC and APL in the ROM, had a toggle switch to select between the two, and the weird characters on the keyboard.

Re: the python name

2019-01-06 Thread rbowman
On 01/02/2019 12:41 PM, Schachner, Joseph wrote: The name "Python" may not make sense, but what sense does the name Java make, or even C (unless you know that it was the successor to B), or Haskell or Pascal or even BASIC? Or Caml or Kotlin or Scratch? Or Oberon or R? Or Smalltalk, or

Re: the python name

2019-01-06 Thread rbowman
On 01/02/2019 11:06 PM, songbird wrote: i can only claim to have written one program in SNOBOL and that was over 30yrs ago... My sympathies... -- https://mail.python.org/mailman/listinfo/python-list