Re: [pygtk] 0.7.0 NameError: gtk_init

2000-05-16 Thread James Henstridge

On Tue, 16 May 2000, George Young wrote:

> [Solaris 2.5.1, Python-1.6a2, pygtk-0.7.0]
> make and install seemed to go fine, but examples/simple/hello1.py says:
> 
>   Traceback (most recent call last):
> File "./hello1.py", line 17, in ?
>   gtk_init()
>   NameError: gtk_init

This example won't work with the pygtk-0.7.0, as the procedural interface
has been removed.

> 
> and hello2.py says:
> 
>   Traceback (most recent call last):
> File "./simple2.py", line 6, in ?
>   from gtk import *
>   ImportError: No module named gtk
> 
> I know this is alpha software, but there must be something stupid I'm doing...
> Any suggestions?
> 
> 
> Running with PYTHONVERBOSE to see what it's loading gets:

This is using the 0.6.x version of pygtk that seems to be
installed.  Either install the new pygtk, or set your PYTHONPATH so that
the not yet installed version is used.

You may also have to add the statement "import ltihooks" to the start of
the example so that python can find the actual locations of libraries from
the .la files.

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


-
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



[pygtk] 0.7.0 NameError: gtk_init

2000-05-16 Thread George Young

[Solaris 2.5.1, Python-1.6a2, pygtk-0.7.0]
make and install seemed to go fine, but examples/simple/hello1.py says:

  Traceback (most recent call last):
File "./hello1.py", line 17, in ?
  gtk_init()
  NameError: gtk_init

and hello2.py says:

  Traceback (most recent call last):
File "./simple2.py", line 6, in ?
  from gtk import *
  ImportError: No module named gtk

I know this is alpha software, but there must be something stupid I'm doing...
Any suggestions?


Running with PYTHONVERBOSE to see what it's loading gets:
PYTHONVERBOSE=1 
LD_LIBRARY_PATH=/opt/gtk/lib:/usr/local/X11R6.1/lib:/usr/lib:/usr/openwin/lib:/opt/lib:/usr/local/lib:/usr/local/X11R5/lib
 ./simple1.py
# /opt/python/lib/python1.6/exceptions.pyc matches 
/opt/python/lib/python1.6/exceptions.py
import exceptions # precompiled from /opt/python/lib/python1.6/exceptions.pyc
# /opt/python/lib/python1.6/site.pyc matches /opt/python/lib/python1.6/site.py
import site # precompiled from /opt/python/lib/python1.6/site.pyc
# /opt/python/lib/python1.6/os.pyc matches /opt/python/lib/python1.6/os.py
import os # precompiled from /opt/python/lib/python1.6/os.pyc
import posix # builtin
# /opt/python/lib/python1.6/posixpath.pyc matches 
/opt/python/lib/python1.6/posixpath.py
import posixpath # precompiled from /opt/python/lib/python1.6/posixpath.pyc
# /opt/python/lib/python1.6/stat.pyc matches /opt/python/lib/python1.6/stat.py
import stat # precompiled from /opt/python/lib/python1.6/stat.pyc
# /opt/python/lib/python1.6/UserDict.pyc matches /opt/python/lib/python1.6/UserDict.py
import UserDict # precompiled from /opt/python/lib/python1.6/UserDict.pyc
Python 1.6a2 (#1, May 16 2000, 11:07:09)  [GCC egcs-2.91.57 19980901 (egcs-1.1 
release)] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
import ExtensionClass # dynamically loaded from 
/opt/python/lib/python1.6/site-packages/ExtensionClass.so
import _gtk # dynamically loaded from 
/opt/python/lib/python1.6/site-packages/_gtkmodule.so
# /opt/python/lib/python1.6/site-packages/GTK.pyc matches 
/opt/python/lib/python1.6/site-packages/GTK.py
import GTK # precompiled from /opt/python/lib/python1.6/site-packages/GTK.pyc
Traceback (most recent call last):
  File "./simple1.py", line 17, in ?
gtk_init()
NameError: gtk_init
# clear __builtin__._
# clear sys.path
# clear sys.argv


George Young,  Rm. L-204[EMAIL PROTECTED]
MIT Lincoln Laboratory
244 Wood St.
Lexington, Massachusetts  02420-9108(781) 981-2756
 
-
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]