I believe that this happens when you accidentally cause an event in the Windows cmd terminal. I'm referring to the terminal from which Leo is launched (i.e., with python -m leo.core.runLeo). It's not only during unit testing. For me, the usual case is that I want to switch to the terminal to see more of the output. I click the mouse in the terminal but accidentally drag it. This hangs Leo. I think it's something about stdin waiting for a keystroke. That's why typing <ENTER> clears it - that terminates the readline on stdin.
Sometimes after I do this, Leo does a full hang, with the circle cursor and translucent overlay (Linux users: this is a Windows thing). Usually this condition will time out after 5 - 10 seconds. On Saturday, February 8, 2020 at 4:41:26 AM UTC-5, Edward K. Ream wrote: > > > > On Thu, Feb 6, 2020 at 1:08 PM Xu Wang <[email protected] <javascript:>> > wrote: > >> Do I need to do something extra in g.execute_shell_commands ? >> > > Good question. Sometimes Leo appears to hang (on Windows) after running > unit tests with g.execute_shell_commands. For me, a fix is to type a > <return> in the console from which Leo is running. > > I'm not sure what else can be done. The guts of g.execute_shell_commands > is just: > > proc = subprocess.Popen(command, shell=True) > if wait: proc.communicate() > > You could try experimenting with shell=False, but I doubt that will work. > > Edward > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/a1b85062-b655-4e07-92a7-363dbee6e026%40googlegroups.com.
