ch1zra a écrit :
On Jun 8, 10:59 am, Bryan <bryanjugglercryptograp...@yahoo.com> wrote:
Python doesn't have one global namespace. Each module (file) has its
own namespace, which is a Python dict, and 'global' means defined in
the containing module's dict. Put the import:

  from reportlab.pdfgen import canvas

in the mkTable.py file. That brings 'canvas' into the mkTable module's
namespace.


thanx so much, it worked.
I am getting some other problems now,

Yeps. One of them being rebinding mkTable.canvas on the first call to mkTable.mkTable...

Get rid of the 'global canvas' at the beginning of the mkTable.mkTable function, and rename your local var to something else than canvas.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to