Def response(flow):
if flow.request.url.startswith(url):
pass
I’m not familiar with mitmdump, but I would look to create another process, launched from Kivy that runs mitmdump.
Take a look at the concurrent programming libraries in the python standard library. Especially, concurrent.futures or subprocesses, depending on how mitmdump operates.
I would write some code to wrap mitmdump to make it look like an iterator. Assuming mitmdump prints out some data, I would put the data in a queue.
From my kivy program I would have a schedule that called the wrapped mitmdump at a regular interval to get the output. If there is no output the iterator does not return any data (just like any iterator). If there is data present the next data element would be returned to be processed by your kivy code,
Hope that helps.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/9b6547c7-2143-45fb-9077-192cf3f26e53%40googlegroups.com.
Took a quick look at mitmdump… looks like you could use the concept below, and simplify things have mitmdump write to a file, and have kivy read the file.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5d7a84e7.1c69fb81.bd52b.4814SMTPIN_ADDED_MISSING%40gmr-mx.google.com.