lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: windows lilypond-book.py


From: Trevor Daniels
Subject: Re: windows lilypond-book.py
Date: Sat, 14 Jan 2012 13:44:28 -0000


Graham, you wrote Saturday, January 14, 2012 12:57 PM

Please change line 36:
   cmd = "sleep 1 && dir"
into this:
   cmd = "dir"
and try again?

Done; no change.  I don't think that was the problem - it'd
got past that and printed "sleep" from line 40. It seems to
be choking on line 41 - time.sleep(1):

$ python test-subprocess2.py
**** Begin testing 8
0. return code:  0
sleep
Traceback (most recent call last):
 File "test-subprocess2.py", line 48, in ?
   main ()
 File "test-subprocess2.py", line 41, in main
   time.sleep(1)
IOError: [Errno 2] No such file or directory

The time module is a .dll on Windows, so I changed the code
to:
   cmd = "dir"
   proc = subprocess.Popen(cmd, shell=True,
       stdout=subprocess.PIPE)
   while proc.poll() is None:
       print "sleep"
       cmd = "sleep 1"
       subprocess.Popen(cmd)
   print "2. return code: ", ret
   ans = proc.communicate()
   print "2b. result from communicate: "
   print ans

Don't know if this makes sense, but it reults in a never-ending
loop printing "sleep".

Trevor




reply via email to

[Prev in Thread] Current Thread [Next in Thread]