From: BORGULYA <ga...@bo...> - 2004-08-18 18:54:36
|
Dear All, I am experimenting with PyX for the first time and I have difficulties! PyX= =20 behaves not as I expect it to. Let's take the first example from the websit= e=20 of PyX (http://pyx.sourceforge.net/examples.html): bash-2.05b$ python Python 2.3.3 (#1, Jun 15 2004, 10:26:37)=20 [GCC 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6)] on= =20 linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pyx import * >>> c =3D canvas.canvas() >>> c.text(0, 0, "Hello, world!") <pyx.text._textbox instance at 0x4042a94c> >>> c.stroke(path.line(0, 0, 2, 0)) <pyx.canvas.canvas instance at 0x4006ba6c> >>> c.writeEPSfile("hello") Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: canvas instance has no attribute 'writeEPSfile' >>> dir(c) ['PSOps', '__doc__', '__init__', '__module__', '_text', 'attrcheck',=20 'attrcount', 'attrdel', 'attrget', 'attrgetall', 'attrgetfirst',=20 'attrgetlast', 'bbox', 'clipbbox', 'draw', 'fill', 'insert', 'prolog', 'set= ',=20 'settexrunner', 'stroke', 'texrunner', 'text', 'trafo', 'write',=20 'writetofile'] >>> c.writetofile("hello") >>>=20 1. As you can see above, there is no procedure called writeEPSfile()! I hav= e=20 no clue why - it appears in all the examples. 2. using dir() I found a procedure with a similar name: writetofile(). This= =20 did make a file called "hello.eps". However, when I view this with KGhostVi= ew=20 the text is displayed vertically. Stange, that with KView it is horisontal. Any ideas? Thanks G=E1bor |