Replies: 4 comments 1 reply
-
@rkpatel33 I haven't programmed in Python in a while, so take this with a grain of salt, but what I think you'd need to do is this: create a thread that reads from that process and writes to a queue (or buffer?). Then create a timer which reads from the queue if it's not empty and renders all the new content in the widget |
Beta Was this translation helpful? Give feedback.
-
Thank you for the suggestion, I will look into that approach.
…On Mon, Feb 14, 2022 at 12:13 AM mwalkerr ***@***.***> wrote:
@rkpatel33 <https://github.com/rkpatel33> I haven't programmed in Python
in a while, so take this with a grain of salt, but what I think you'd need
to do is this: create a thread that reads from that process and writes to a
queue (or buffer?). Then create a timer which reads from the queue if it's
not empty and renders all the new content in the widget
—
Reply to this email directly, view it on GitHub
<#245 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA47TQLMFZTKBMZC3LO2NPLU3C2TBANCNFSM5NFIFH6Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I just saw this and thought it might help. |
Beta Was this translation helpful? Give feedback.
-
I did not, have not had a chance to return. I am using straight intervals
for certain panes that are refreshing a finite set amount of data.
…On Mon, Mar 21, 2022 at 7:23 PM mwlayne ***@***.***> wrote:
Did you ever solve this issue? I am thinking about doing something similar
—
Reply to this email directly, view it on GitHub
<#245 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA47TQMYEPUTE64HJBSSG33VBEVKNANCNFSM5NFIFH6Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I am trying to setup a widget that will show continuous output from a Kubernetes watch command or log follow command:
I am trying to use Python subprocess to capture these logs and then
render
them on a 2 sec refresh, but I am having trouble with figuring out how to implement this in aWidget
. All the methods I've tried result in a loop where the process never ends waiting for the next line, so you never get to the end of therender()
method to return a chunk of output.Beta Was this translation helpful? Give feedback.
All reactions