Re: GObject introspection & Python3



On 9 July 2011 12:25, Daniel Drake <dsd laptop org> wrote:
> As a test, I installed python3-gobject on Fedora 15 and tried to run
> this test app, which works fine with Python2:
> http://dev.laptop.org/~dsd/20110625/wkdemo.py
>
> It failed as follows:
>
> Traceback (most recent call last):
>  File "wkdemo.py", line 4, in <module>
>    from gi.repository import Gtk, WebKit
>  File "/usr/lib/python3.2/site-packages/gi/importer.py", line 76, in
> load_module
>    dynamic_module._load()
>  File "/usr/lib/python3.2/site-packages/gi/module.py", line 251, in _load
>    overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
>  File "/usr/lib/python3.2/site-packages/gi/overrides/Gtk.py", line
> 400, in <module>
>    class MessageDialog(Gtk.MessageDialog, Dialog):
>  File "/usr/lib/python3.2/site-packages/gi/overrides/Gtk.py", line
> 404, in MessageDialog
>    type=Gtk.MessageType.INFO,
>  File "/usr/lib/python3.2/site-packages/gi/module.py", line 127, in __getattr__
>    ascii_upper_trans = string.maketrans(
> AttributeError: 'module' object has no attribute 'maketrans'

Martin Pitt fixed this in pygobject git and it now works perfectly in
Python 3. Great work!

Daniel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]