What GVariant corresponds to a Python3 int?
- From: Robert Park <robru gottengeography ca>
- To: python-hackers-list gnome org
- Subject: What GVariant corresponds to a Python3 int?
- Date: Fri, 13 Jul 2012 00:07:42 -0500
So, I'm just beginning the process of porting my PyGObject application
to Python3. Mostly it's going well (it runs and most features
function), but I'm getting this weird error message:
(gottengeography:9763): GLib-GIO-CRITICAL **: g_settings_bind:
property 'offset' on class 'gg+camera+Camera' has type 'glong' which
is not compatible with type 'i' of key 'offset' on schema
'ca.exolucere.gottengeography.camera'
And here is the related code, which worked perfectly in Python 2.7:
class Camera(GObject.GObject):
offset = GObject.property(type=int, minimum=-3600, maximum=3600)
utc_offset = GObject.property(type=int, minimum=-24, maximum=24)
[...etc...]
So, why are Python3 ints translating into glongs, how is that different
from the behavior in Python 2.7, and what should I do to fix this? For
the purposes of the property I need the number to be an integer. I
tried most other gvariant types in the schemas but nothing seemed
to suppress this error.
Thanks.
--
http://gottengeography.ca
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]