Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #37193
| Date | 2013-01-21 07:25 -0400 |
|---|---|
| Subject | Windows subprocess.call problem |
| From | Tom Borkin <borkintom@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.738.1358767516.2939.python-list@python.org> (permalink) |
[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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Windows subprocess.call problem Tom Borkin <borkintom@gmail.com> - 2013-01-21 07:25 -0400
csiph-web