I use the START command sometimes.  For example, in the 
*execute-external-file* command, I have this bit:

            if processor == 'cmd.exe':
                cmd = ['start', processor, '/k', fullpath]
                subprocess.Popen(cmd, shell=True)
            else:
                cmd = ['start', 'cmd.exe', '/k', processor, fullpath]
                subprocess.Popen(cmd, shell=True)

But START can be tricky.  For example, if the first parameter on the 
command line is in double quotes, it is used as the title of the window.  
If you don't realize that and the program you are STARTing needs to have 
its path quoted, START won't work because you program path will become the 
title and the next arg, if any, will become the program to execute, which 
is not what you want.  You have to use a pair of double quotes to avoid the 
problem:  START "" "quote path to program to run".  START has other quirks 
too.

I find it's easy to get confused about output when two programs run in the 
same console - who is printing to the console just now?  There's also the 
matter of how to terminate a program if it gets stuck or you are done with 
it.

One approximate equivalent on Linux is to end the command line with an 
ampersand.  This launches the program and its output goes to the terminal 
as usual.  If you hit CTRL-z, it executes in the background and you can use 
the terminal for other things too. the *jobs* command will show background 
programs. 

On Tuesday, June 11, 2024 at 5:37:01 AM UTC-4 Edward K. Ream wrote:

> I have always launched programs in separate Windows consoles and used 
> Alt-Tab to switch between them. But two nights ago, I realized that this 
> procedure creates unnecessary work. What if it were possible to launch 
> multiple programs from a single console?
>
>
> OMG. Ten minutes of googling reveals that the Windows "*start*" command 
> does exactly what I want. So now all my workhorse .cmd scripts use "start".
>
>
> The only drawback is that the console no longer remembers command history.
>
>
> Btw, it's now possible to launch two scripts at once. For example, * s && 
> d* launches both the s.cmd and d.cmd scripts.
>
>
> *Summary*
>
>
> There is no need to alt-tab to the correct console! This is the biggest 
> improvement to my workflow in recent memory.
>
>
> I assume a similar trick is possible on other platforms.
>
>
> 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/9527a722-23f4-4061-9e63-cd426158c099n%40googlegroups.com.

Reply via email to