[pygtk] Unable to run your tutorial examples

A.K.Karthikeyan ak at mindaslab.in
Wed Dec 17 01:10:32 WST 2008


Hello PyGTK people,

I have tried to run *pygtkconsole.py* 
<http://www.pygtk.org/pygtk2tutorial/examples/pygtkconsole.py> and 
*gpython.py* <http://www.pygtk.org/pygtk2tutorial/examples/gpython.py> 
found in http://www.pygtk.org/pygtk2tutorial/ch-Introduction.html on my 
Ubuntu 8.04, but I got the following error message

<http://www.pygtk.org/pygtk2tutorial/examples/gpython.py>
Traceback (most recent call last):
  File "pygtkconsole.py", line 14, in <module>
    import gtk
  File "/media/sda7/python/py/gtk.py", line 2
SyntaxError: Non-ASCII character '\xe2' in file 
/media/sda7/python/py/gtk.py on line 2, but no encoding declared; see 
http://www.python.org/peps/pep-0263.html for details

and

Traceback (most recent call last):
  File "gpython.py", line 16, in <module>
    import gtk, gobject
  File "/media/sda7/python/py/gtk.py", line 2
SyntaxError: Non-ASCII character '\xe2' in file 
/media/sda7/python/py/gtk.py on line 2, but no encoding declared; see 
http://www.python.org/peps/pep-0263.html for details

I am clueless what to even after visiting 
http://www.python.org/peps/pep-0263.html as there are no non-ASCII 
characters in program. Can any one help me?

Thanks in advance,

A.K.Karthikeyan




More information about the pygtk mailing list