[Top][All Lists]

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

Re: [O] A bit more feedback on org-publish-all

From: Nick Dokos
Subject: Re: [O] A bit more feedback on org-publish-all
Date: Mon, 06 Feb 2012 10:27:53 -0500

François Pinard <address@hidden> wrote:

> ... 
> This is more similar to my actual usage, which really is:
>         [...]
>         write = sys.stderr.write
>         for line in os.popen('emacs 2>&1 -batch'
>                              ' -l ~/fp/notes/publish.el'
>                              ' -f org-publish-all'):
>             write(repr(line) + '\n')
>             sys.stderr.flush()
>             [...]
> The write(...) and the flush() are only there for debugging: I wanted to
> see if the lines are delivered timely or not (and I'm seemingly getting
> the Emacs output in one blow).  I just do not understand why the
> behavior differs between the "... | cat" line and the Python excerpt.
> I'm surely missing something somewhere...  Sigh!

I would recommend that you chuck the obsolete os.popen() permanently and
learn the subprocess module: you will be much happier. Setting bufsize=0
(which is the default) should give you unbuffered output from the process.


reply via email to

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