|
From: Michael H. <mh...@us...> - 2007-05-01 23:45:40
|
Hi - New to PyX, and working my way through the documentation...
Does anyone have any examples of using the page class? I've tried
the following piece of code and I get an error message "Traceback
(most recent call last):
File "./hello.py", line 8, in ?
page = page(c,paperformat=paperformat.Letter)
NameError: name 'page' is not defined"
-----------------------------
#!/usr/bin/python
from pyx import *
c = canvas.canvas()
c.text(0, 0, "Hello, world!")
c.stroke(path.line(0, 0, 2, 0))
page = page(c,paperformat=paperformat.Letter)
-----------------------------
I assume there's something stupid I'm not doing.
PyX version: 0.8.1-4 (installed on MacOS X using fink install pyx-py23)
python version: 2.3.5
----------------------------------------------------------------
Michael Hearne
mh...@us...
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
----------------------------------------------------------------
|