Hi Mitesh,

On Sep 2, 12:42 am, Mitesh Patel <qed...@gmail.com> wrote:
> ...
> If you still have a copy of the "hanging" package directory, could you
> try print-debugging to isolate the problem?  Possibilities include the
> system calls to 'tar' and to 'sage -hg diff'.

I reconstructed the hanging package directory, and additional print
statements in spkg-pkg located the problem:

I have a print statement before and after the line
     p = Popen("cd %s; sage --hg diff" % dir, shell=True, stdout=PIPE,
stderr=PIPE)

*Both* print statements are executed.

Then, I inserted
      print p.stdout.read()
which was executed as well. Amazing enough, *with* that additional
line, the package was created!

Then, I replaced it by
      print p.stderr.read()
and this is what hangs. Indeed, the next line in the unmodified script
is
      if len(p.stderr.read()) != 0:

So, that's the problem. Why is p.stderr.read() hanging? And why does
it not hang if p.stdout.read() is called first?

Cheers,
Simon

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to