[PyQt] QProcess arguments list problem
kib2 at free.fr
Thu Nov 22 08:58:21 GMT 2007
Mark Summerfield a écrit :
> I think PyQt is nice enough to accept a Python list here. Also, I don't
> think you can use a shell redirection (>) like this, so I'd try:
> self.proc.start("lout", ["-o", "my_file.ps", "my_file.lout"])
Thanks Mark, this is exactly what I was looking for.
> If you really wanted to use redirection you'd have to do it yourself,
> that is:
> self.proc.start("lout", ["my_file.lout"])
> # Now read the process's stdout and write that to your .ps file.
In fact, that's what I've done last night. It works like a charm too,
but now I think I'll choice the other solution.
> Off Topic:
> In lout (and many other apps) the -o option says write the postscript to
> the filename following; do lout -v for a summary of all the options; and
> don't use the PDF option, use ghostscript for PDF.
Thanks for pointing me this, I used this with another console
application (Asymptote) and that works as expected.
More information about the PyQt