Windows subprocess.call problem

Tom Borkin borkintom at gmail.com
Tue Jan 22 00:22:14 CET 2013


nobody at nowhere.com had an excellent suggestion that worked right off the
bat and achieved exactly what I was after. Thanks all!
Tom


On Mon, Jan 21, 2013 at 9:04 AM, Dave Angel <d at davea.name> wrote:

> On 01/21/2013 06:25 AM, Tom Borkin wrote:
>
>> Hi;
>> I have this code:
>> <snip>
>>
>> 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 songs
>> 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.
>
>
> --
> DaveA
> --
> http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130121/c23e11f8/attachment.html>


More information about the Python-list mailing list