Re: What I learned today

2020-02-14 Thread duncan smith
On 14/02/2020 23:21, Dan Stromberg wrote: > On Fri, Feb 14, 2020 at 3:10 PM Stefan Ram wrote: > >> By trial and error (never read documentation!) I found >> that you can count the number of e's in a text by just >> >> Counter( text ).get( 'e' ) >> >> (after »from collections import Counter«

Re: What I learned today

2020-02-14 Thread Dan Stromberg
On Fri, Feb 14, 2020 at 3:10 PM Stefan Ram wrote: > By trial and error (never read documentation!) I found > that you can count the number of e's in a text by just > > Counter( text ).get( 'e' ) > > (after »from collections import Counter« that is). > Even simpler, though not suitable for a

Re: first time python learner

2020-02-14 Thread Terry Reedy
On 2/13/2020 11:38 PM, Marty Konopko wrote: Win 10 Anti Virus off [image: image.png] Any idea? Cameron already suggested a better title and question. If it is about IDLE startup, read https://docs.python.org/3/library/idle.html#startup-failure -- Terry Jan Reedy -- https://mail.python.o

RE: ghostscripts in python with watchdog

2020-02-14 Thread Peter Otten
legau...@gmail.com wrote: > os.system("... {input_pdf} ...".format(..., input_pdf=input_pdf)) > I see it does not like spaces in the file name Use subprocess.call(), not os.system(), then: >>> filename = "hello world.txt" >>> with open(filename, "w") as f: print("Hello, world!", file=f) ... >>

RE: ghostscripts in python with watchdog

2020-02-14 Thread legaulph
I see it does not like spaces in the file name -Original Message- From: legau...@gmail.com Sent: Friday, February 14, 2020 7:55 AM To: 'Bheesham Persaud' ; python-list@python.org Subject: RE: ghostscripts in python with watchdog I'm not sure what happens, when I'm testing and suddenly I

RE: ghostscripts in python with watchdog

2020-02-14 Thread legaulph
I'm not sure what happens, when I'm testing and suddenly I will start getting this error. Error: /undefinedfilename in (1) Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostr