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)
...
>>
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
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
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
I'm trying to use ghostscripts with python watchdog.
I want to duplicate the last page of a pdf to another directory using the
same name as the source pdf + page number.
So watchdog will monitor the directory for the pdf and ghostscript will copy
the last page to another directory.
I have this,