[Python-Dev] PEP 492: async/await in Python; version 5
Guido van Rossum
guido at python.org
Wed May 6 23:39:30 CEST 2015
Sorry to send you on such a wild goose chase! I did mean the issue you
found #21). I just updated it with a link to a thread that has more
I wasn't able to verify the version by Luciano Ramalho. (And yes, extending
all this to working with a subprocess is left as an exercise. It's all
pretty academic IMO, given Tkinter's lack of popularity outside IDLE.)
On Wed, May 6, 2015 at 2:32 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> On 5/5/2015 10:59 PM, Guido van Rossum wrote:
>> For this you should probably use an integration of asyncio (which can do
>> async subprocess output nicely) with Tkinter. Over in tulip-land there
>> is an demo of such an integration.
> After redirection from googlecode tulip, I found
> None of the 4 *process*.py examples mention tkinter.
> I also found "Create a Tkinter/Tulip integration"
> with attachment tk_ayncio.zip
> copied (with 'async' replacing 'tulip') to
> None of the integration files mention subprocess, so I presume you are
> suggesting that I use a modification of one of the example subprocess
> coroutines with the integration framework.
> If this works well, might it make sense to consider using an elaboration
> of examples/subprocess_shell.py to replace subprocess socket communication
> with pipe comminication?
> On Tue, May 5, 2015 at 6:03 PM, Terry Reedy <tjreedy at udel.edu
>> <mailto:tjreedy at udel.edu>> wrote:
> My specific use case is to be able to run a program in a separate
>> process, but display the output in the gui process -- something like
>> this (in Idle, for instance). (Apologies if this misuses the new
>> async def menu_handler()
>> ow = OutputWindow(args) # tk Widget
>> proc = subprocess.Popen (or multiprocessing equivalent)
>> out = (stdout from process)
>> await for line in out:
>> I want the handler to not block event processing, and disappear
>> after finishing. Might 492 make this possible someday? Or would
>> having 'line in pipe' or just 'data in pipe' translated to a tk
>> event likely require a patch to tk?
> Terry Jan Reedy
> Python-Dev mailing list
> Python-Dev at python.org
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev