Re: installation problem

2019-10-23 Thread MRAB
On 2019-10-24 00:47, fateme jbr wrote: Dear Python team I have installed Python 3.7.4 on windows 10. I have access to IDLE and I can run simple programs, but when I type python in command window nothing happens. I wanna install pip and afterward some libraries and it is when the problem occurs.

installation problem

2019-10-23 Thread fateme jbr
Dear Python team I have installed Python 3.7.4 on windows 10. I have access to IDLE and I can run simple programs, but when I type python in command window nothing happens. I wanna install pip and afterward some libraries and it is when the problem occurs. why doesn't prompt window recognize pyth

Fursday Flippancy: American Py

2019-10-23 Thread DL Neil via Python-list
[via PlanetPython] The "American Py" song. Lyrics which amused me, at https://www.reddit.com/r/Python/comments/dfm2zv/american_py/ 'Multi-taskers' may like to read and listen-along to: https://www.youtube.com/watch?v=uAsV5-Hv-7U For the benefit of us silver-surfers reliving our youth (or for t

Re: Black

2019-10-23 Thread DL Neil via Python-list
On 22/10/19 3:18 AM, lizhollinshe...@gmail.com wrote: What do people think about black? I'm asking because one of my personal preferences is to use spaces for clarity: 1. right = mystr[ start : ] black version right=mystr[start:] 2. mtime = time.asctime( time.localtime( info.s

Unpickle patch: cannot instantiate 'WindowsPath' on your system

2019-10-23 Thread edgar
Hello, I hope that I am writing to the right list. Python 3.7.4 on GNU/Linux Parabola 5.3.1-gnu-1 x86_64 AMD Issue: I got a .pickle which had some WindowsPath inside. I was unable to unpickle like this: ┌ │ import pickle as pkl │ from pathlib import Path, PureWindowsPath, PurePath, PurePo

Re: TypeError: unhashable type: 'list'

2019-10-23 Thread David L Neil via Python-list
On 23/10/19 8:51 PM, joseph pareti wrote: I am experimnenting with this (reproducer) code: pattern_eur= ['Total amount'] mylines = []# Declare an empty list. with open ('tmp0.txt', 'rt') as myfile: # Open tmp.txt for reading text. for myline in myfile:

Re: TypeError: unhashable type: 'list'

2019-10-23 Thread DL Neil via Python-list
On 23/10/19 8:51 PM, joseph pareti wrote: I am experimnenting with this (reproducer) code: pattern_eur= ['Total amount'] mylines = []# Declare an empty list. with open ('tmp0.txt', 'rt') as myfile: # Open tmp.txt for reading text. for myline in myfile:

Re: TypeError: unhashable type: 'list'

2019-10-23 Thread Peter Otten
joseph pareti wrote: > I am experimnenting with this (reproducer) code: > pattern_eur= ['Total amount'] Make that pattern_eur = 'Total amount' >match_C = re.search(pattern_eur, element) The first argument to re.search() should be a string, not a list of strings: >>> import re >>> re.

Re: TypeError: unhashable type: 'list'

2019-10-23 Thread Joel Goldstick
On Wed, Oct 23, 2019 at 3:54 AM joseph pareti wrote: > > I am experimnenting with this (reproducer) code: > pattern_eur= ['Total amount'] the above line can't contain a list -- just a string see help(re.search) > mylines = []# Declare an empty list. > with op

TypeError: unhashable type: 'list'

2019-10-23 Thread joseph pareti
I am experimnenting with this (reproducer) code: pattern_eur= ['Total amount'] mylines = []# Declare an empty list. with open ('tmp0.txt', 'rt') as myfile: # Open tmp.txt for reading text. for myline in myfile: # For each line in the fil