[PySide] using QProcess to run python function
Frank Rueter | OHUfx
frank at ohufx.com
Thu Jul 23 23:17:52 CEST 2015
Hi Florian,
thanks for the reply. This entire thread was posted here, not sure why
it wouldn't show up for you.
>>it all really depends on how dummyFunction() looks and how it prints
to stdout.
It's python code that calls calls other python code which eventually
calls external image processing programs to do some heavy lifting, which
print their progress to stdout. E.g.:
dummyFunction() calls fucntionA() which calls fucntionB() which runs the
external program via Popen.subprocess.
I'm happy to restructure a bit as long as the functions that deal with
managing the external program stay non-QT so they can be used via
command line without QT present.
Cheers,
frank
On 23/07/15 7:22 pm, Florian Bruhin wrote:
> (disclaimer: I didn't read your whole quoted private discussion as
> this seems to be the first mail going to the pyside mailinglist)
>
> * Frank Rueter | OHUfx <frank at ohufx.com> [2015-07-23 16:05:05 +1200]:
>> [...]
>> The question is how do I emit the stdout from dummyFunction() while it's
>> running (it takes a minute or so to finish all sorts of tasks)? Do I have to
>> move it to an extra thread again and connect to that?
> There are some solutions I can imagine for this - but it all really
> depends on how dummyFunction() looks and how it prints to stdout.
>
> (Can't you just make it do something more sane than printing to
> stdout?)
>
> Florian
>
--
ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing
<http://ohufx.com/index.php/vfx-compositing> | *workflow customisation
and consulting <http://ohufx.com/index.php/vfx-customising>* *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20150724/cd7a2b33/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ohufxLogo_50x50.png
Type: image/png
Size: 2666 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20150724/cd7a2b33/attachment.png>
More information about the PySide
mailing list