Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #37193 > unrolled thread

Windows subprocess.call problem

Started byTom Borkin <borkintom@gmail.com>
First post2013-01-21 07:25 -0400
Last post2013-01-21 07:25 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Windows subprocess.call problem Tom Borkin <borkintom@gmail.com> - 2013-01-21 07:25 -0400

#37193 — Windows subprocess.call problem

FromTom Borkin <borkintom@gmail.com>
Date2013-01-21 07:25 -0400
SubjectWindows subprocess.call problem
Message-ID<mailman.738.1358767516.2939.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

Hi;
I have this code:

#!/Python27/python
import os, subprocess, sys
lyrics_path = "/Users/Tom/Documents/lyrics"
os.chdir(lyrics_path)

songs = ['livin-la-vida-loca', 'whos-that-lady']
for song in songs:
  subprocess.call(['notepad.exe', '%s.txt' % song])
my_songs_path = "aa english lyrics"
os.chdir(my_songs_path)
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.
TIA,
Tom

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web