Re: Why can't numpy array be restored to saved value?

2020-11-25 Thread Greg Ewing
On 25/11/20 7:47 pm, pjfarl...@earthlink.net wrote: Why isn't the final value of the numpy array npary in the following code the same as the initial value before some but not all elements of the array were changed to a new value? Slicing a numpy array doesn't copy anything, it just gives you an

Re: Environment vars

2020-11-25 Thread Greg Ewing
On 26/11/20 10:30 am, Bob van der Poel wrote: Yes, but os.path.split() turns a single path into its components. We're chatting about a bunch of complete path names separated by os.pathsep. Yeah, it's unfortunate that the word "path" is conventionally used for two very different things... -- Gr

Re: Environment vars

2020-11-25 Thread Eryk Sun
On 11/25/20, Bob van der Poel wrote: > > Ahha! Didn't know about os.pathsep. Seems simple enough to use that and be > done with it. > > I'm just using str.split() just now. Is there a os.splitpath()? I don't see > anything in the docs. There are no platform standard rules to follow when splitting

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 2:22 PM dn via Python-list wrote: > > Ahha! Didn't know about os.pathsep. Seems simple enough to use that and > be > > done with it. > > > > I'm just using str.split() just now. Is there a os.splitpath()? I don't > see > > anything in the docs. > > > https://docs.python.or

Re: Environment vars

2020-11-25 Thread dn via Python-list
Ahha! Didn't know about os.pathsep. Seems simple enough to use that and be done with it. I'm just using str.split() just now. Is there a os.splitpath()? I don't see anything in the docs. https://docs.python.org/3/library/os.path.html#os.path.split -- Regards =dn -- https://mail.python.org/mail

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 12:43 PM Eryk Sun wrote: > On 11/25/20, Bob van der Poel wrote: > > I've got a program which accepts an optional env variable listing a > single > > or multiple directory for the app to use. > > In Unix one would use colon as the preferred delimiter. In Windows, > it's a

Re: Environment vars

2020-11-25 Thread dn via Python-list
On 26/11/2020 08:43, Chris Angelico wrote: On Thu, Nov 26, 2020 at 6:19 AM dn via Python-list wrote: I've got a program which accepts an optional env variable listing a single or multiple directory for the app to use. I've done a bit of a search and see both a comma and semicolon being used/s

Re: Environment vars

2020-11-25 Thread Eryk Sun
On 11/25/20, Bob van der Poel wrote: > I've got a program which accepts an optional env variable listing a single > or multiple directory for the app to use. In Unix one would use colon as the preferred delimiter. In Windows, it's a semicolon because DOS paths use colon to designate drives. Pytho

Re: Environment vars

2020-11-25 Thread Chris Angelico
On Thu, Nov 26, 2020 at 6:19 AM dn via Python-list wrote: > > >> I've got a program which accepts an optional env variable listing a single > >> or multiple directory for the app to use. I've done a bit of a search and > >> see both a comma and semicolon being used/suggested as a path separator. >

Re: unable to use numpy

2020-11-25 Thread dn via Python-list
On 26/11/2020 06:53, ASHUTOSH SHARMA wrote: Good Evening Welcome to the *world wide* web, where it is also Thursday, and breakfast time (for late risers)!? I had installed numpy and updated to latest version also but getting runtime error pop while using. So please resolve this issue by g

Re: Environment vars

2020-11-25 Thread dn via Python-list
I've got a program which accepts an optional env variable listing a single or multiple directory for the app to use. I've done a bit of a search and see both a comma and semicolon being used/suggested as a path separator. Any consensus on which is better? ... The one thing I really would *not* r

unable to use numpy

2020-11-25 Thread ASHUTOSH SHARMA
Good Evening I had installed numpy and updated to latest version also but getting runtime error pop while using. So please resolve this issue by giving a suitable solution of this. THANKS & REGARDS ASHUTOSH SHARMA Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/py

Re: Environment vars

2020-11-25 Thread Grant Edwards
On 2020-11-25, Bob van der Poel wrote: > What does DWIN mean? It's DWIM: "do what I mean". It refers to software (like PHP) that instead of requiring unambiguous input, it silently (and often incorrectly) guesses what ambiguous input is supposed to mean using heuristics known to and understood b

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 11:00 AM dn via Python-list wrote: > On 26/11/2020 05:46, Bob van der Poel wrote: > > I've got a program which accepts an optional env variable listing a > single > > or multiple directory for the app to use. I've done a bit of a search and > > see both a comma and semicol

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 10:59 AM Chris Angelico wrote: > On Thu, Nov 26, 2020 at 4:36 AM Bob van der Poel wrote: > > > > I've got a program which accepts an optional env variable listing a > single > > or multiple directory for the app to use. I've done a bit of a search and > > see both a comma

Re: Problem exiting from a script using tkinter

2020-11-25 Thread Paulo da Silva
Às 22:44 de 21/11/20, Chris Angelico escreveu: > On Sun, Nov 22, 2020 at 9:36 AM Paulo da Silva > wrote: >> >> Às 22:18 de 21/11/20, Chris Angelico escreveu: >>> On Sun, Nov 22, 2020 at 9:16 AM Paulo da Silva >>> wrote: Hi! Why this does not work?! from tkinter impor

Re: Environment vars

2020-11-25 Thread dn via Python-list
On 26/11/2020 05:46, Bob van der Poel wrote: I've got a program which accepts an optional env variable listing a single or multiple directory for the app to use. I've done a bit of a search and see both a comma and semicolon being used/suggested as a path separator. Any consensus on which is bett

Re: Environment vars

2020-11-25 Thread Chris Angelico
On Thu, Nov 26, 2020 at 4:36 AM Bob van der Poel wrote: > > I've got a program which accepts an optional env variable listing a single > or multiple directory for the app to use. I've done a bit of a search and > see both a comma and semicolon being used/suggested as a path separator. > Any consen

Environment vars

2020-11-25 Thread Bob van der Poel
I've got a program which accepts an optional env variable listing a single or multiple directory for the app to use. I've done a bit of a search and see both a comma and semicolon being used/suggested as a path separator. Any consensus on which is better? MYPATHS=foo,bar,woof or MYPATHS=foo

RE: Why can't numpy array be restored to saved value?

2020-11-25 Thread pjfarley3
Never mind, I found the numpy.copy function does what I need. Revised code below works. Sorry for wasting bandwidth. Peter --- nptest.py --- import numpy as np import sys if len(sys.argv) > 0: try: asz = int(sys.argv[1]) + 0 except: asz = 4 npary = np.full([asz, asz, a