# [Matplotlib-users] Win32 python 2.3 and User's Guide

which contains only one directory with the following

> files: AUTHORS TODO pep.txt setup.py test_subprocess.py
> MANIFEST.in _subprocess.c setup.cfg subprocess.py

Hmm, this is starting to make me nervous.... I didn't realize
extension code was going to be involved. I thought we were dealing
with a single python file.

If it starts to look like distributing subprocess across platforms is
non-trivial and we need it, I'll switch my vote to +1 for revamping
backend_ps and backend_agg to delay import of texmanager until needed
and leave it to texmanager users to make sure they install subprocess.

JDH

I think we need to catch the exit status. As Nils discovered, there are
opportunities for latex and friends to fail silently and give strange results
(\frac{1}{2} vs $\frac{1}{2}$). Other errors will result in missing temporary
files (like dvi's and png's), which are not as difficult to track down, but
still a pain in the butt.

I just had a thought. os.system will yield the exit status, but the stdout,
stderr messages automatically get passed on to sys.stdout. I think I could
temporarily redirect sys.stdout long enough to catch that information behind
the scenes. Is there a reason not to pursue this route?

Darren

···

On Friday 17 March 2006 12:08, John Hunter wrote:

> which contains only one directory with the following
> files: AUTHORS TODO pep.txt setup.py test_subprocess.py
> MANIFEST.in _subprocess.c setup.cfg subprocess.py

Hmm, this is starting to make me nervous.... I didn't realize
extension code was going to be involved. I thought we were dealing
with a single python file.

If it starts to look like distributing subprocess across platforms is
non-trivial and we need it, I'll switch my vote to +1 for revamping
backend_ps and backend_agg to delay import of texmanager until needed
and leave it to texmanager users to make sure they install subprocess.

Would this work across platforms? It works on linux and windows:

exitstat = os.system('tex --version > temp.txt' )

···

On Friday 17 March 2006 13:07, Darren Dale wrote:

On Friday 17 March 2006 12:08, John Hunter wrote:

>
> > which contains only one directory with the following
> > files: AUTHORS TODO pep.txt setup.py test_subprocess.py
> > MANIFEST.in _subprocess.c setup.cfg subprocess.py
>
> Hmm, this is starting to make me nervous.... I didn't realize
> extension code was going to be involved. I thought we were dealing
> with a single python file.
>
> If it starts to look like distributing subprocess across platforms is
> non-trivial and we need it, I'll switch my vote to +1 for revamping
> backend_ps and backend_agg to delay import of texmanager until needed
> and leave it to texmanager users to make sure they install subprocess.

I think we need to catch the exit status. As Nils discovered, there are
opportunities for latex and friends to fail silently and give strange
results (\frac{1}{2} vs $\frac{1}{2}$). Other errors will result in missing
temporary files (like dvi's and png's), which are not as difficult to track
down, but still a pain in the butt.

I just had a thought. os.system will yield the exit status, but the stdout,
stderr messages automatically get passed on to sys.stdout. I think I could
temporarily redirect sys.stdout long enough to catch that information
behind the scenes. Is there a reason not to pursue this route?