Re: [python-uk] embedding python ImportError: libpyglib PyExc_ImportError

2010-10-29 Thread Jamie Kirkpatrick
Well, do you have that library on your system?  The problem is that you are
loading a Python module that uses a C extension module under the hood so
your python runtime is looking to load in that library as you import that
module but its not finding it.

How have you "installed" the gtk module so your embedded Python can see it?
 I've never embedded Python in a C application before but I'll do what I can
to help you :)

BTW: A great site for quick answers to questions like this (if you don't
already know it) is stackoverflow.com

Jamie

On 28 October 2010 22:46, Oliver Marks  wrote:

> Hi i am a new member on this list and thought if some people may be able
> to enlighten me to the error below ?
>
> I am running 64 bit ubuntu 10.10 in case there are know issues with this
> setup, basically i am embedding python inside a c application i managed
> to get this to work i can call functions from the original c program and
> the scripts run until i import gtk in the python script this causes the
> error below.
>
> I am using the waf build system to build the c program, my knowledge of
> c is limited i am more a python programmer which is why i am attempting
> the embed python so i can write my plugins in python.
>
> I get the feeling the error is todo with linking but i dont get why i
> can import gtk normally in python but not when its embeded ?
>
> Any help or pointers would be appreciated, that might help me get this
> solved or better understand what is wrong.
>
> Traceback (most recent call last):
>  File "/usr/local/share/geany/plugins/gpykickstart.py", line 4, in
> 
>import glib
>  File "/usr/lib/pymodules/python2.6/gtk-2.0/glib/__init__.py", line 22,
> in 
>from glib._glib import *
> ImportError: /usr/lib/libpyglib-2.0-python2.6.so.0: undefined symbol:
> PyExc_ImportError
> Failed to load the "gpykickstart" module from the
> "/usr/local/share/geany/plugins" directory.
>
>
> ___
> python-uk mailing list
> python-uk@python.org
> http://mail.python.org/mailman/listinfo/python-uk
>
___
python-uk mailing list
python-uk@python.org
http://mail.python.org/mailman/listinfo/python-uk


[python-uk] PyCon co-presenter sought for OpenGL talk

2010-10-29 Thread Jonathan Hartley

Hey folks,

I'm searching for a co-presenter for a talk I've proposed at PyCon 
(Atlanta 2011).


The title is 'Algorithmically Generated OpenGL Geometry', and it's 
currently envisioned as an improved version of a talk I already gave at 
EuroPython under the title 'Hobbyist OpenGL : Flying High'

(blogged with screenshots here: http://tartley.com/?p=1207)

The talk presents a simple and Pythonic way to model 3D polyhedra, shows 
how to convert those into the arrays that OpenGL expects, and then plays 
around with a bunch with algorithms that act on the polyhedra class, to 
generate fun & interesting virtual sculptures.


I'd like a co-presenter simply because I think it would be more fun to 
prepare and present with someone else than by myself, plus of course the 
talk will benefit from the imagination of two people being applied to it.


People I asked to date are either too busy or shy or can't attend, so I 
thought I'd try this more scattershot approach. If you have any interest 
(even if you have reservations, e.g. would like to work on it, but are 
too shy to present, or would like to present, but don't have much time 
to help prepare), then let me know.


Jonathan

--
Jonathan Hartley  Made of meat.  http://tartley.com
tart...@tartley.com   +44 7737 062 225   twitter/skype: tartley


___
python-uk mailing list
python-uk@python.org
http://mail.python.org/mailman/listinfo/python-uk


Re: [python-uk] embedding python ImportError: libpyglib PyExc_ImportError

2010-10-29 Thread oly
  BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
}This is the result of searching for that library, also i dont get
the error when running python normally only when its embeded, so
something must be different when you embed for the error to only
occur when when running code in the embeded version.
 locate /usr/lib/libpyglib
 /usr/lib/libpyglib-2.0-python2.6.so.0
 /usr/lib/libpyglib-2.0-python2.6.so.0.0.0
  I have double checked and i have all the python-dev packages and
all the dev packages for things like gtk and the other libraries i
require and have search for the .h files and they seem to be present
and in place.
 On Fri 29/10/10  8:39 AM , Jamie Kirkpatrick
j...@kirkconsulting.co.uk sent:
 Well, do you have that library on your system?  The problem is that
you are loading a Python module that uses a C extension module under
the hood so your python runtime is looking to load in that library as
you import that module but its not finding it. 
 How have you "installed" the gtk module so your embedded Python can
see it?  I've never embedded Python in a C application before but
I'll do what I can to help you :)
  BTW: A great site for quick answers to questions like this (if you
don't already know it) is stackoverflow.com [1]
 Jamie
  On 28 October 2010 22:46, Oliver Marks  wrote:
  Hi i am a new member on this list and thought if some people may be
able
 to enlighten me to the error below ?
 I am running 64 bit ubuntu 10.10 in case there are know issues with
this
 setup, basically i am embedding python inside a c application i
managed
 to get this to work i can call functions from the original c program
and
 the scripts run until i import gtk in the python script this causes
the
 error below.
 I am using the waf build system to build the c program, my knowledge
of
 c is limited i am more a python programmer which is why i am
attempting
 the embed python so i can write my plugins in python.
 I get the feeling the error is todo with linking but i dont get why
i
 can import gtk normally in python but not when its embeded ?
 Any help or pointers would be appreciated, that might help me get
this
 solved or better understand what is wrong.
 Traceback (most recent call last):
   File "/usr/local/share/geany/plugins/gpykickstart.py", line 4, in
 import glib
   File "/usr/lib/pymodules/python2.6/gtk-2.0/glib/__init__.py", line
22,
 in 
 from glib._glib import *
 ImportError: /usr/lib/libpyglib-2.0-python2.6.so.0: undefined
symbol:
 PyExc_ImportError
 Failed to load the "gpykickstart" module from the
 "/usr/local/share/geany/plugins" directory.
 ___
 python-uk mailing list
 python-uk@python.org [3]
 http://mail.python.org/mailman/listinfo/python-uk [4]


Links:
--
[1] http://stackoverflow.com
[2] mailto:o...@digitaloctave.com
[3] mailto:python-uk@python.org
[4] http://mail.python.org/mailman/listinfo/python-uk
___
python-uk mailing list
python-uk@python.org
http://mail.python.org/mailman/listinfo/python-uk