Yes, that's what I noticed :
- moving from 2.x to 3.x needs an overall refactoring of the python code,
since there are many differences (and no backward compatibility with 2.x
code) ;
- furthermore, a lot of famous and useful python libraries did not move to
3.x yet.

So a move to 3.x would not be a good idea, right now. Maybe in the future,
when 3.x is widely adopted and considered as the standard by the python
community. However, we may introduce 'slow' changes in order to prepare this
move, while remaining compliant with 2.x:
for instance, print "foo" raises an exception in 3.x. You need to use
print("foo") instead. In the pythonocc current code, there are a lot of
print "foo". But I was surprised to notice that print("foo") also works with
python 2.5 and 2.6. It's an example of a change that would not break the
compatibility with 2.5 or 2.6. May be a small step to 2.7 would be better in
a short term. What do you think about it?

By the way, I'm curious to know more about the decision from the Blender
developers to rely on python 3.k (according to Joel). They do have a
longterm vision!

Thomas

2011/1/21 Sébastien Ramage <sebastien.ram...@gmail.com>

>  Hi all !
>
> Be careful, a port to python 3.x will break the compatibility of wxPython
> since wxPython is not yet ready for Python 3.x
>
> Sébastien
>
>
>
> Le 21/01/2011 00:30, Joel Putnam a écrit :
>
> Thomas
>
>  Would this be of any help?
>
>  http://docs.python.org/library/2to3.html
>
>  I am not much of a programmer but I am willing to poke away at this over
> the next few months.
>
>  Joel
>
>
> On Thu, Jan 20, 2011 at 5:03 PM, Thomas Paviot <tpav...@gmail.com> wrote:
>
>> Joel,
>>
>>  The move to python 3 is not planned yet. Although SWIG is able to deal
>> with python3k, the python code we wrote would need a major refactoring (more
>> certainly a 'port' to python3), unless there is some kind of script that can
>> automate the move from 2.x to 3k.
>>
>>  Thomas
>>
>> 2011/1/20 Joel Putnam <joel.put...@studioinference.net>
>>
>>> Thomas,
>>>
>>>  yes py2.6 is default but I have installed 3.1 as well. The current
>>> Blender 2.56 is build on python 3.1 (packaged internally) I have managed to
>>> use the previous version and imported FreeCAD and pythonOCC. I do
>>> not currently work with the previous version of blender and as the jump from
>>> 2.4 to 2.5 was a major re-write so much of the functionality is different. I
>>> guess I will have to wait until pythonOCC moves to a newer version of
>>> python.
>>>
>>>  joel
>>>
>>>
>>> On Thu, Jan 20, 2011 at 4:10 PM, Thomas Paviot <tpav...@gmail.com>wrote:
>>>
>>>> Hi Joel,
>>>>
>>>>  pythonOCC has been successfully tested for py2.5 and 2.6. I have no
>>>> hear about any 2.7 attempt. pythonOCC is not compliant with 3.1 changes 
>>>> from
>>>> the 2.x series.
>>>>
>>>>  I also use to work with Ubuntu 10.04, with the default python2.6. I
>>>> didn't know Blender requires 3.1 to be installed. If you can run Blender
>>>> with py2.6, then you will be able to interface pythonOCC and Blender (which
>>>> is a good idea, much looking forward to seeing the result).
>>>>
>>>>  Thomas
>>>>
>>>> 2011/1/20 Joel Putnam <joel.put...@studioinference.net>
>>>>
>>>>>  Hi,
>>>>>
>>>>>  I would very much like to build PythonOCC with python 3.1 and have
>>>>> the ability to import it into blender as a way to allow conversion to cad
>>>>> formats other than those available in blender. I am using Ubuntu 10.4, 
>>>>> with
>>>>> python 3.1 installed. Is there any instructions out that would aid in
>>>>> accomplishing this?
>>>>>
>>>>>
>>>>> --
>>>>> Joel Putnam
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>  _______________________________________________
>>>>> Pythonocc-users mailing list
>>>>> Pythonocc-users@gna.org
>>>>> https://mail.gna.org/listinfo/pythonocc-users
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Pythonocc-users mailing list
>>>> Pythonocc-users@gna.org
>>>> https://mail.gna.org/listinfo/pythonocc-users
>>>>
>>>>
>>>
>>>
>>>  --
>>> Joel Putnam
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Pythonocc-users mailing list
>>> Pythonocc-users@gna.org
>>> https://mail.gna.org/listinfo/pythonocc-users
>>>
>>>
>>
>> _______________________________________________
>> Pythonocc-users mailing list
>> Pythonocc-users@gna.org
>> https://mail.gna.org/listinfo/pythonocc-users
>>
>>
>
>
> --
> Joel Putnam
>
>
>
>
> _______________________________________________
> Pythonocc-users mailing 
> listPythonocc-users@gna.orghttps://mail.gna.org/listinfo/pythonocc-users
>
>
> _______________________________________________
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
>
>
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to