Re: pip doesn't work

2021-08-12 Thread Peter Otten
On 13/08/2021 06:49, Ridit wrote: So, whoever gets this, when I try to download packages using pip, it shows errors saying "'pip' is not recognized as an internal or external command, operable program or batch file." Is there a way to solve this? I tried modifying, even repairing

pip doesn't work

2021-08-12 Thread Ridit
So, whoever gets this, when I try to download packages using pip, it shows errors saying "'pip' is not recognized as an internal or external command, operable program or batch file." Is there a way to solve this? I tried modifying, even repairing three times, but still it doesn't work.

Re: some problems for an introductory python test

2021-08-12 Thread Greg Ewing
On 13/08/21 5:52 am, Grant Edwards wrote: I think what he's talking about is allowing the user to attach arbitrary _metadata_ to the file ... IOW, something similar to the > "resource fork" that MacOS used to have. The resource fork was used for more than just metadata, it was often the entire

Re: some problems for an introductory python test

2021-08-12 Thread Greg Ewing
On 13/08/21 11:42 am, Cameron Simpson wrote: 2: It took me a while to see, but this is a type annotiation. Interestingly, it seems to be parsed as a form of assignment with a missing RHS. >>> from ast import parse, dump >>> dump(parse("if0: print('yes!')")) "Module(body=[AnnAssign(target=Name(

Re: some problems for an introductory python test

2021-08-12 Thread Cameron Simpson
On 12Aug2021 12:09, Hope Rouselle wrote: >Chris Angelico writes: >> [...] Plus, it had this fancy >> concept of "extended attributes"; on older systems (like MS-DOS's >> "FAT" family), a file might be Read-Only, Hidden, a System file, or >> needing to be Archived, and that was it - but on HPFS, y

Re: some problems for an introductory python test

2021-08-12 Thread Cameron Simpson
On 11Aug2021 09:11, Hope Rouselle wrote: >Greg Ewing writes: >> That may not be doing what you think it's doing. Consider also >> > if0: print('yes!') >> yes! > >So, yes, that's puzzling. > 0 == False >True if0: print("yes") >yes if(0): print("yes") > > >What's going on th

Re: some problems for an introductory python test

2021-08-12 Thread Dennis Lee Bieber
On Fri, 13 Aug 2021 04:41:42 +1000, Chris Angelico declaimed the following: >Yeah. It was a strange choice by today's standards, but back then, >most of my GUI programs were written in REXX. > >https://en.wikipedia.org/wiki/VX-REXX >http://www.edm2.com/0206/vrexx.html > There was a librar

Re: some problems for an introductory python test

2021-08-12 Thread Grant Edwards
On 2021-08-12, MRAB wrote: > >> Windows never had filesystems that supported metadata like OS/2 and >> MacOS did. The registry was an ugly hack that attempted (very poorly) >> to make up for that lack of metadata. >> > FYI, NTFS does support Alternate Data Streams. That is interesting -- and it

Re: some problems for an introductory python test

2021-08-12 Thread Dennis Lee Bieber
On Thu, 12 Aug 2021 12:09:58 -0300, Hope Rouselle declaimed the following: >How is it possible that Microsoft would take part of the code of OS/2? >Did IBM just hand it to them? > Because IBM subcontracted (IE: "paid") M$ to create an OS with XYZ features for their latest PC (under supe

Re: some problems for an introductory python test

2021-08-12 Thread MRAB
On 2021-08-12 18:52, Grant Edwards wrote: On 2021-08-12, Hope Rouselle wrote: OS/2 had all kinds of amazing features (for its time). [...] Plus, it had this fancy concept of "extended attributes"; on older systems (like MS-DOS's "FAT" family), a file might be Read-Only, Hidden, a System file,

Re: some problems for an introductory python test

2021-08-12 Thread Chris Angelico
On Fri, Aug 13, 2021 at 5:03 AM Grant Edwards wrote: > > On 2021-08-12, Hope Rouselle wrote: > > >> OS/2 had all kinds of amazing features (for its time). [...] Plus, > >> it had this fancy concept of "extended attributes"; on older > >> systems (like MS-DOS's "FAT" family), a file might be Read-

Re: some problems for an introductory python test

2021-08-12 Thread Grant Edwards
On 2021-08-12, Hope Rouselle wrote: >> OS/2 had all kinds of amazing features (for its time). [...] Plus, >> it had this fancy concept of "extended attributes"; on older >> systems (like MS-DOS's "FAT" family), a file might be Read-Only, >> Hidden, a System file, or needing to be Archived, and th

Re: some problems for an introductory python test

2021-08-12 Thread Chris Angelico
On Fri, Aug 13, 2021 at 2:15 AM Hope Rouselle wrote: > > Chris Angelico writes: > > > History lesson! > > > > Once upon a time, IBM and Microsoft looked at what Intel was > > producing, and went, hey, we need to design an operating system that > > can take advantage of the fancy features of this

Re: FW: Troubleshoot python app launch

2021-08-12 Thread MRAB
On 2021-08-12 03:31, Tan Jane wrote: From: [1]Tan Jane Sent: Wednesday, 11 August 2021 7:48 PM To: [2]python-list@python.org Subject: Troubleshoot python app launch Hi, I encountered attached screenshot issue while launching the python application downloaded fo

Re: some problems for an introductory python test

2021-08-12 Thread Hope Rouselle
Chris Angelico writes: [...] >> > [1] And boy oh boy was that good fun. The OS/2 Presentation Manager >> > had a wealth of power available. Good times, sad that's history now. >> >> I know OS/2 only by name. I never had the pleasure of using it. In >> fact, I don't even know how it looks. I m

Re: on slices, negative indices, which are the equivalent procedures?

2021-08-12 Thread Dennis Lee Bieber
On Thu, 12 Aug 2021 13:17:32 +1200, dn via Python-list declaimed the following: >I've been trying to remember if we had negative-steps in FORTRAN >do-loops especially once the capability to define subscripting-ranges >came 'in' (but can't be bothered researching further). If it was >available, o

Re: Is there a better way to create a list of None objects?

2021-08-12 Thread Dennis Lee Bieber
On Thu, 12 Aug 2021 09:57:33 +0100, Stephen Tucker declaimed the following: > ># Logic Effect > ># > ># [None * 8]TypeError: unsupported operand type(s) for *: ... > ># [(None) * 8] TypeError: unsupported operand type(s) for *: ... > ># [((None)) * 8]TypeError: unsup

FW: Troubleshoot python app launch

2021-08-12 Thread Tan Jane
From: [1]Tan Jane Sent: Wednesday, 11 August 2021 7:48 PM To: [2]python-list@python.org Subject: Troubleshoot python app launch Hi, I encountered attached screenshot issue while launching the python application downloaded for windows. Please advice on the above.

Re: Is there a better way to create a list of None objects?

2021-08-12 Thread Stephen Tucker
Thanks for this feedback, Chris, Matthieu. Both are spot on - and thanks for the timing comparison, Matthieu. I suppose I didn't think to try the solution you suggest because I didn't think that I would end up with a single list, but 8 of them. OK, I'll stop wriggling. Stephen. On Thu, Aug 12, 2

Re: Is there a better way to create a list of None objects?

2021-08-12 Thread Matthieu Dartiailh
You can achieve the same result by writing: [None] * 8 Comparing both cases in IPython I get: In [1]: %timeit list((None,)*8) 110 ns ± 0.785 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each) In [2]: %timeit [None] * 8 88.2 ns ± 0.432 ns per loop (mean ± std. dev. of 7 runs, 1000

Re: Is there a better way to create a list of None objects?

2021-08-12 Thread Chris Angelico
On Thu, Aug 12, 2021 at 6:59 PM Stephen Tucker wrote: > > Hi, > > I thought I'd share the following piece of code that I have recently written > (a) to check that what I have done is reasonable - even optimum, > (b) to inform others who might be wanting to do similar things, and > (c) to invite co

Is there a better way to create a list of None objects?

2021-08-12 Thread Stephen Tucker
Hi, I thought I'd share the following piece of code that I have recently written (a) to check that what I have done is reasonable - even optimum, (b) to inform others who might be wanting to do similar things, and (c) to invite comment from the community. -