certi-devel
[Top][All Lists]
Advanced

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

Re: [certi-dev] PyHLA compliant with python 3+


From: Charles Lesire-Cabaniols
Subject: Re: [certi-dev] PyHLA compliant with python 3+
Date: Thu, 23 Jun 2011 11:26:22 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10

On 23/06/2011 11:07, Gotthard, Petr wrote:
Just an update: I did commit an update of PyHLA that should be able to compile 
with all Pythons>  2.5, including 3.x. However, I didn't have time (yet) to 
test it thoroughly, so it might not work properly (for now).

Petr


Thanks Petr.

It compiles sucessfully towards Python 3.1 on my config.

When running the updateAttributeValues examples:

- I first need to modify the print statements to be compliant with python3+ (now the syntax is 'print(...)') ; I join the patch coming from the '2to3' python conversion script;

- and then the following error appears:

$ python3.1 uav-send.py
Traceback (most recent call last):
  File "uav-send.py", line 4, in <module>
    import hla.omt as fom
File "/home/lesire/install/lib/python3.1/dist-packages/hla/omt/__init__.py", line 45 self.enumEnumerators += [(attributes["name"],int(attributes["values"]))]

Charles.
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Charles 
Lesire-Cabaniols
Sent: 15. června 2011 9:53
To: address@hidden
Subject: Re: [certi-dev] PyHLA compliant with python 3+

On 15/06/2011 09:48, Gotthard, Petr wrote:
Hi Charles,

I will do it. I already started and the biggest issue seems to be keeping 
compatibility with python 2.x, so it will take me few days.
Ok, great news! Thanks Petr.

I had a quick look at it, and most problems seem to come from the C
code. Then using
#if PY_MAJOR_VERSION>= 3
... code for python3 ...
#else
... code for python2 ...
#endif

should solve the compatibility issue in C files.

Will you be able to compile it yourself, or will you need a binary package?
I compile it myself from sources.

Petr

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Charles 
Lesire-Cabaniols
Sent: 14. června 2011 18:09
To: CERTI Devel mailing list
Subject: [certi-dev] PyHLA compliant with python 3+

Hi,

I am involved in the development of a robotic simulator, Morse
(http://www.openrobots.org/wiki/morse/).
I want to provide a distributed simulation framework for Morse, based on
the CERTI.

Morse is built over Blender, mostly through python scripts.

Last versions of Blender use python3, and I then need a python3
compliant HLA library.

Unfortunately, PyHLA does not compile towards python3.1.

Has anyone already tried to port PyHLA to python3?
Does anyone want to help/contribute?

Best,

Charles.



Attachment: uav-receive-py3.patch
Description: Text Data

Attachment: uav-send-py3.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]