Re: Q: argparse.add_argument()

2023-03-18 Thread Thomas Passin
On 3/18/2023 10:52 PM, Gisle Vanem via Python-list wrote: Thomas Passin wrote: So please, try to think out how your questions will seem to the reader, and be clear about what you are asking.  You may not know the terminology that some other people use, but don't let that stop you from being

Re: Q: argparse.add_argument()

2023-03-18 Thread Gisle Vanem via Python-list
Thomas Passin wrote: So please, try to think out how your questions will seem to the reader, and be clear about what you are asking.  You may not know the terminology that some other people use, but don't let that stop you from being clear about what you really need to find out.  Including

Re: Packing Problem

2023-03-18 Thread Rob Cliffe via Python-list
On 02/03/2023 19:40, Weatherby,Gerard wrote: Haven’t look at it all in detail, but I’d replace the list comprehensions with a loop: CopyOfWords = list(Words) Words = [(w[1:] if w[0] == ch else w) for w in Words] Words = [w for w in Words if w != '']

Re: Tkinter and cv2: "not responding" popup when imshow launched from tk app

2023-03-18 Thread John O'Hagan
On Tue, 2023-03-14 at 21:54 +1100, John O'Hagan wrote: [...] > Here is minimal code that demonstrates the problem in the subject > line: > > import cv2 > from tkinter import * > > images=['a.jpg', 'b.jpg', 'c.jpg'] #change to image paths > > cv2.namedWindow('W', cv2.WND_PROP_FULLSCREEN) >

Re: Friday finking: IDE 'macro expansions'

2023-03-18 Thread dn via Python-list
On 19/03/2023 01.27, 2qdxy4rzwzuui...@potatochowder.com wrote: On 2023-03-18 at 11:49:24 +, "Weatherby,Gerard" wrote: For templating, I have two Python programs for starting new work. One generates a standalone Python program with the Python shebang, a __main__ which calls def main(), and

Re: Q: argparse.add_argument()

2023-03-18 Thread Thomas Passin
On 3/18/2023 4:05 PM, Chris Angelico wrote: On Sun, 19 Mar 2023 at 06:35, Gisle Vanem via Python-list wrote: Thomas Passin wrote: Are you trying to troll here? You just showed how you got an error with this construction, so why are you asking how to get an error with this construction?

Re: Q: argparse.add_argument()

2023-03-18 Thread Chris Angelico
On Sun, 19 Mar 2023 at 06:35, Gisle Vanem via Python-list wrote: > > Thomas Passin wrote: > > > Are you trying to troll here? > > > You just showed how you got an error with this construction, so why are you > asking how to > > get an error with this construction? > > I meant (obviously),

Re: Q: argparse.add_argument()

2023-03-18 Thread Gisle Vanem via Python-list
Thomas Passin wrote: Are you trying to troll here? You just showed how you got an error with this construction, so why are you asking how to get an error with this construction? I meant (obviously), another error-message besides: error: unrecognized arguments: -cn Perhaps from

Re: Q: argparse.add_argument()

2023-03-18 Thread Chris Angelico
On Sun, 19 Mar 2023 at 06:09, Thomas Passin wrote: > > On 3/18/2023 2:02 PM, Gisle Vanem via Python-list wrote: > > I accidentally used 'argparse' like this in my Python 3.9 program: > >parser.add_argument ("-c, --clean", dest="clean", action="store_true") > >parser.add_argument ("-n,

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread Thomas Passin
On 3/17/2023 11:52 AM, a a wrote: On Friday, 17 March 2023 at 16:32:53 UTC+1, a a wrote: On Friday, 17 March 2023 at 16:03:14 UTC+1, Thomas Passin wrote: On 3/16/2023 8:07 PM, a a wrote: Crash report: Problem Caption: Problem Event Name: APPCRASH Application name: python.exe Application

Re: Q: argparse.add_argument()

2023-03-18 Thread Thomas Passin
On 3/18/2023 2:02 PM, Gisle Vanem via Python-list wrote: I accidentally used 'argparse' like this in my Python 3.9 program:   parser.add_argument ("-c, --clean",  dest="clean", action="store_true")   parser.add_argument ("-n, --dryrun", dest="dryrun", action="store_true") instead of:  

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread Thomas Passin
On 3/17/2023 11:32 AM, a a wrote: On Friday, 17 March 2023 at 16:03:14 UTC+1, Thomas Passin wrote: It would be worth trying to downgrade the multiarray version to an earlier one and see if that fixes the problem. Thank you Thomas for your kind reply. I am fully aware to be living on an old

Re: Fwd: Friday finking: IDE 'macro expansions'

2023-03-18 Thread Peter J. Holzer
On 2023-03-18 16:06:49 +, Alan Gauld wrote: > On 18/03/2023 12:15, Peter J. Holzer wrote: > >> I think you might be meaning TurboPascal, Delphi's forerunner. It just > >> had a compiler and text editor. > > > > I'd still classify Turbo Pascal as an IDE. It wasn't a standalone > > compiler you

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread a a
On Friday, 17 March 2023 at 16:03:14 UTC+1, Thomas Passin wrote: > On 3/16/2023 8:07 PM, a a wrote: > > Crash report: > > > > Problem Caption: > > Problem Event Name: APPCRASH > > Application name: python.exe > > Application version: 3.8.7150.1013 > > Application time signature: 5fe0df5a >

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread a a
On Friday, 17 March 2023 at 16:03:14 UTC+1, Thomas Passin wrote: > On 3/16/2023 8:07 PM, a a wrote: > > Crash report: > > > > Problem Caption: > > Problem Event Name: APPCRASH > > Application name: python.exe > > Application version: 3.8.7150.1013 > > Application time signature: 5fe0df5a >

Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-18 Thread a a
On Friday, 17 March 2023 at 16:32:53 UTC+1, a a wrote: > On Friday, 17 March 2023 at 16:03:14 UTC+1, Thomas Passin wrote: > > On 3/16/2023 8:07 PM, a a wrote: > > > Crash report: > > > > > > Problem Caption: > > > Problem Event Name: APPCRASH > > > Application name: python.exe > > >

Q: argparse.add_argument()

2023-03-18 Thread Gisle Vanem via Python-list
I accidentally used 'argparse' like this in my Python 3.9 program: parser.add_argument ("-c, --clean", dest="clean", action="store_true") parser.add_argument ("-n, --dryrun", dest="dryrun", action="store_true") instead of: parser.add_argument ("-c", "--clean", dest="clean",

Re: Fwd: Friday finking: IDE 'macro expansions'

2023-03-18 Thread Alan Gauld
On 18/03/2023 12:15, Peter J. Holzer wrote: >> I think you might be meaning TurboPascal, Delphi's forerunner. It just >> had a compiler and text editor. > > I'd still classify Turbo Pascal as an IDE. It wasn't a standalone > compiler you would invoke on source files you wrote with some other It

Re: Fwd: Friday finking: IDE 'macro expansions'

2023-03-18 Thread Roel Schroeven
Peter J. Holzer schreef op 18/03/2023 om 13:15: On 2023-03-18 08:46:42 +, Alan Gauld wrote: > On 17/03/2023 17:55, Thomas Passin wrote: > >> I used Delphi and Smalltalk/V which both pretty much only exist within > >> their own IDEs and I used their features extensively. > > > > Back when

Re: Fwd: Friday finking: IDE 'macro expansions'

2023-03-18 Thread Thomas Passin
On 3/18/2023 8:15 AM, Peter J. Holzer wrote: On 2023-03-18 08:46:42 +, Alan Gauld wrote: On 17/03/2023 17:55, Thomas Passin wrote: I used Delphi and Smalltalk/V which both pretty much only exist within their own IDEs and I used their features extensively. Back when Delphi first came out,

Re: Fwd: Friday finking: IDE 'macro expansions'

2023-03-18 Thread Thomas Passin
On 3/18/2023 4:46 AM, Alan Gauld wrote: On 17/03/2023 17:55, Thomas Passin wrote: I used Delphi and Smalltalk/V which both pretty much only exist within their own IDEs and I used their features extensively. Back when Delphi first came out, when I first used it, I don't remember any IDE; one

Re: Friday finking: IDE 'macro expansions'

2023-03-18 Thread 2QdxY4RzWzUUiLuE
On 2023-03-18 at 11:49:24 +, "Weatherby,Gerard" wrote: > For templating, I have two Python programs for starting new work. One > generates a standalone Python program with the Python shebang, a > __main__ which calls def main(), and logging and argparser > intialization. The other generates

Re: Debugging reason for python running unreasonably slow when adding numbers

2023-03-18 Thread Peter J. Holzer
On 2023-03-15 17:09:52 +, Weatherby,Gerard wrote: > Sum is faster than iteration in the general case. I'd say this is the special case, not the general case. > def sum1(): > s = 0 > for i in range(100): > s += i > return s > > def sum2(): > return

Re: Fwd: Friday finking: IDE 'macro expansions'

2023-03-18 Thread Peter J. Holzer
On 2023-03-18 08:46:42 +, Alan Gauld wrote: > On 17/03/2023 17:55, Thomas Passin wrote: > >> I used Delphi and Smalltalk/V which both pretty much only exist within > >> their own IDEs and I used their features extensively. > > > > Back when Delphi first came out, when I first used it, I don't

Re: Friday finking: IDE 'macro expansions'

2023-03-18 Thread Weatherby,Gerard
I send ~99% of Python coding time in PyCharm. Likewise, IntelliJ and Clion for Java and C++, respectively. Mostly use: Tab completion for variable names Letting PyCharm figure out imports for me, and cleaning up old, unused imports. Jumping to definitions of symbols. Tellling me I’ve made a type

Re: Fwd: Friday finking: IDE 'macro expansions'

2023-03-18 Thread Alan Gauld
On 17/03/2023 17:55, Thomas Passin wrote: >> I used Delphi and Smalltalk/V which both pretty much only exist within >> their own IDEs and I used their features extensively. > > Back when Delphi first came out, when I first used it, I don't remember > any IDE; one just used a text editor. I