Hi,

On Mon, 19 Nov 2007 16:01:21 +0000
Laurence Tratt <[EMAIL PROTECTED]> wrote:

> I have made available a port of the PyX Python graphics creation library at:
> 
>   http://tratt.net/laurie/obsd/ports/py-pyx.tar.gz  
> 
> From the blurb:
> 
>   PyX is a Python package for the creation of PostScript and PDF files. It
>   combines an abstraction of the PostScript drawing model with a TeX/LaTeX
>   interface. Complex tasks like 2d and 3d plots in publication-ready quality
>   are built out of these primitives.
> 
> Basically, it creates graphics, and farms them out to TeX for rendering
> (with all the associated goodies that implies). It's not perfect (it does
> die occasionally when calling TeX), but it's mostly OK; the results it
> produces are of excellent quality, particularly when compared to the often
> rather random output from py-matplotlib.
> 
> Tested on amd64 and i386, both -current. I welcome reports from other
> platforms.

I am testing it on macppc. I often get the following error with
the provided examples:

----
$ python2.5 changesymbol.py 
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/threading.py", line 460, in __bootstrap
    self.run()
  File 
"/usr/ports/graphics/py-pyx/w-py-pyx-0.10/fake-macppc/usr/local/lib/python2.5/site-packages/pyx/text.py",
 line 639, in run
    read = self.pipe.readline() # read again
IOError: [Errno 4] Interrupted system call

/usr/local/lib/python2.5/site-packages/pyx/text.py:850: UserWarning: still 
waiting for tex after 5 (of 60) seconds...
  warnings.warn("still waiting for %s after %i (of %i) seconds..." %
(self.mode, waited, self.waitfortex))
...
----

It seems to finally work after several attempts (running the program 3 or 4
times). It is really annoying. I am almost sure it is due to some thread
misuse. There is probably a race condition in the texrunner setup: delaying
the threaded pipe reader loop by one second (arbitrarily) seems to make
everything work fine. I have not investigated further.

I think this should be fixed before the port makes it to the tree.
Laurence, would you have a look a it? Otherwise I will do it but not
before this WE at least.


Eric.

Reply via email to