Re: Windows subprocess.call problem

Discussion in 'Python' started by Terry Reedy, Jan 21, 2013.

  1. Terry Reedy

    Terry Reedy Guest

    On 1/21/2013 6:22 PM, Tom Borkin wrote:
    > <mailto:> 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 <
    > <mailto:>> 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.




    --
    Terry Jan Reedy
     
    Terry Reedy, Jan 21, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Golden
    Replies:
    0
    Views:
    179
    Tim Golden
    Nov 18, 2012
  2. Chris Rebert
    Replies:
    0
    Views:
    218
    Chris Rebert
    Nov 18, 2012
  3. Dave Angel
    Replies:
    0
    Views:
    182
    Dave Angel
    Nov 21, 2012
  4. Tim Golden
    Replies:
    0
    Views:
    134
    Tim Golden
    Nov 21, 2012
  5. Prasad, Ramit
    Replies:
    0
    Views:
    167
    Prasad, Ramit
    Nov 23, 2012
Loading...

Share This Page