[PySide] Communicating with detached process

Frank Rueter frank at ohufx.com
Mon Nov 28 20:30:47 CET 2022


Thanks Eric! I will look into your suggestions.


On Sat, Nov 12, 2022 at 1:13 PM Eric Werner <ewerybody at gmail.com> wrote:

> Hello Frank,
> Have you had a look at the fortuneserver/client examples?
> They use a QTcpSocket connection and it looks pretty solid.
>
> If you don't want any direct connections like these I guess a dedicated
> log and QFileSystemWatcher to read it is fine.
> It's also pretty quick!
>
> I also need to display any stdout or stderror from the launched
>> applications though.
>>
> Well this sounds rather tough (to me). You'd need a detached process that
> actually captures the outputs.
>
> So you could run a python process running the desired 3rd party app via
> subprocess.Popen and constantly listening to the outputs on
> proc.stderr.readline()
> proc.stdout.readline()
>
>
> On Thu, Nov 10, 2022 at 8:15 AM Frank Rueter <frank at ohufx.com> wrote:
>
>> Hi,
>>
>> I am writing an app launcher which will allow for several commercial
>> applications to be launched into a custom process environment.
>> To ensure that none of the launched applications die in case my launcher
>> crashes, I am using QProcess.startDetached().
>>
>> I also need to display any stdout or stderror from the launched
>> applications though.
>>
>> Since I can't connect the signals of detached processes back to my
>> launcher app I assume the only way is to have them output to a log file
>> which the launcher can read. Is that the right approach?
>> Should I use QFileSystemWatcher to monitor the log files and read&purge
>> them as they change or is there a better way?
>>
>> How would the pros do this?
>>
>> Cheers,
>> Frank
>> _______________________________________________
>> PySide mailing list
>> PySide at qt-project.org
>> https://lists.qt-project.org/listinfo/pyside
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20221129/ad987103/attachment.htm>


More information about the PySide mailing list