[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH 1/1] QMP test code - qmp.py
From: |
Costas Drogos |
Subject: |
Re: [Qemu-devel] Re: [PATCH 1/1] QMP test code - qmp.py |
Date: |
Wed, 7 Apr 2010 17:38:20 +0300 |
On Wed, Apr 7, 2010 at 16:51, Avi Kivity <address@hidden> wrote:
>> This won't do what we want for 2.7 and newer, so a better if would be:
Thats why i said it is just an ugly hack :) Anyway, I've just cloned
the qmp-unstable tree to run some tests and report back
>> if sys.version_info< (2, 6):
>> import simplejson as json
>> else:
>> import json
>>
>>
>
> try:
> import json
> except:
> import simplejson as json
I thought of that, but the thing is that, in Debian at least, there is
python-json for python 2.5 which does not work, but can be imported,
and also python-simplejson. On python2.6 json module is included and
there is a package python2.6-simplejson also. Anyway, we can't check
what every distribution does with modules, so I think Avi's solution
works most of the times. In the end it is just a test script :)
Thanks for the comments :)
--
Costas Drogos