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

RE: ghostscripts in python with watchdog

2020-02-14 Thread legaulph
ython-list On Behalf Of Bheesham Persaud Sent: Friday, February 14, 2020 1:26 AM To: python-list@python.org Subject: Re: ghostscripts in python with watchdog Hey! If you change the "-sOutputFile` parameter you pass into gswin64c. For example, something like: output_directory

Re: ghostscripts in python with watchdog

2020-02-13 Thread Bheesham Persaud
Hey! If you change the "-sOutputFile` parameter you pass into gswin64c. For example, something like: output_directory = os.path.join(os.path.dirname(input_src), "out") And then you should be able to modify the call to `os.system` to something like: os.system( "gswin64c -q -d