Path: csiph.com!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'skip:[ 20': 0.03; 'subsequent': 0.04; 'subject:skip:s 10': 0.05; 'sys': 0.05; 'tom': 0.07; 'subject:Windows': 0.09; 'tia,': 0.09; 'hangs': 0.16; 'hi;': 0.16; 'subprocess,': 0.16; '8bit%:3': 0.17; 'import': 0.21; 'advise.': 0.22; 'os,': 0.22; 'subject:problem': 0.22; 'skip:" 20': 0.26; 'skip:# 10': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; "skip:' 10": 0.30; 'skip:& 30': 0.30; 'print': 0.32; 'skip:s 30': 0.33; 'to:addr:python-list': 0.33; 'code:': 0.33; 'received:google.com': 0.34; 'open': 0.35; 'received:209.85': 0.35; 'next': 0.35; 'available.': 0.37; 'execute': 0.37; 'received:209': 0.37; 'skip:o 20': 0.38; 'to:addr:python.org': 0.39; 'list,': 0.39; 'first': 0.61; 'song': 0.84; 'songs': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=UgtHGiQ3VPf1p9+GVPT5h88xKPuuN/hLFd8Pi8q8+Dg=; b=I4XbTWjCgNoFt1ruv7MKVWTSBSXmZ0qJ2yooMFe6s4BPKU7YoW8YcYuulkaQVcWCNv vtwTM+cREqQCxgV9JzhH2EXoD3JU1ijm90E0GQevobwr9Emr0Cb8cdchWDnGse4RA2Rr BjUaEKtcBLwUnYEZqhQ8MFmBuvJDNW+KW7jn6MayyEY6Ur3i4nKTwUlHcity9l+RQ+nw wdE0wtIv+sUUpVhaKhHiH1i0saOV5XqoZd0Bgqpi8B6AD9A9lGzxXb8gBpe9WrPsUgYm 5ZpkAHMyNtguNPPXBrNWEZ43md74zGJY9zeAK25Cyco9qbK6pS/ywnOrrOp681S8Ljm2 okeQ== MIME-Version: 1.0 X-Received: by 10.60.32.37 with SMTP id f5mr13360553oei.19.1358767506599; Mon, 21 Jan 2013 03:25:06 -0800 (PST) Date: Mon, 21 Jan 2013 07:25:06 -0400 Subject: Windows subprocess.call problem From: Tom Borkin To: python-list@python.org Content-Type: multipart/alternative; boundary=e89a8fb20020902e0304d3cab6b7 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 48 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1358767516 news.xs4all.nl 6984 [2001:888:2000:d::a6]:57649 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37193 --e89a8fb20020902e0304d3cab6b7 Content-Type: text/plain; charset=ISO-8859-1 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 --e89a8fb20020902e0304d3cab6b7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi;
I have this code:
=A0
#!/Python27/python
import os, subprocess, sys
ly= rics_path =3D "/Users/Tom/Documents/lyrics"
os.chdir(lyrics_pa= th)
=A0
songs =3D ['livin-la-vida-loca', 'whos-that-= lady']
for song in songs:
=A0 subprocess.call(['notepad.exe&#= 39;, '%s.txt' % song])
my_songs_path =3D "aa eng= lish lyrics"
os.chdir(my_songs_path)
for song in my_songs:
=A0 subprocess.c= all(['notepad.exe', '%s.txt' % song])
=A0 print song
=A0
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
--e89a8fb20020902e0304d3cab6b7--