Windows subprocess.call problem
tjreedy at udel.edu
Tue Jan 22 00:38:27 CET 2013
On 1/21/2013 6:22 PM, Tom Borkin wrote:
> nobody at nowhere.com <mailto:nobody at nowhere.com> had an excellent
> suggestion that worked right off the bat and achieved exactly what I was
> after. Thanks all!
And what was it?
> On Mon, Jan 21, 2013 at 9:04 AM, Dave Angel <d at davea.name
> <mailto:d at davea.name>> wrote:
> On 01/21/2013 06:25 AM, Tom Borkin wrote:
> I have this code:
> for song in my_songs:
> subprocess.call(['notepad.exe'__, '%s.txt' % song])
> print song
> It opens the first song and hangs on subsequent songs. It
> doesn't open the
> next song or execute the print until I have closed the first
> one. I want it
> to open all in the list, one after another, so I have all those
> available. Please advise.
> Why not just pass all the filenames as parameters in one invocation
> of notepad? Assuming Notepad is written reasonably, that'll give it
> all to you in one window, instead of opening many separate ones.
Terry Jan Reedy
More information about the Python-list