On Mon, 2010-10-11 at 19:42 +1300, Rob Brown-Bayliss wrote:
> Hi
> 
> Does any one know why am I getting this error in the attached file?
> Why can't I use DrawingArea in gtk?

Because the attached file is called cairo.py; it calls "import gtk",
which during import I presume calls "import cairo", which resolves to
the cairo.py file instead of the system library.

The old mutual import / include problem....

Rename the file and it works fine.

John

> 
> File "/home/rob/cairo.py", line 9, in <module>
>   import gtk
> File "/usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py", line 40,
> in <module>
>   from gtk import _gtk
> File "/home/rob/cairo.py", line 12, in <module>
>   class EggClockFace(gtk.DrawingArea):
> 
> 
> 
> _______________________________________________
> pygtk mailing list   [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to