update python version 2to3

Coders and would-be coders alike, this is the place to talk about programming.
Post Reply
cascraft
ultra-n00b
Posts: 6
Joined: Sat Oct 22, 2016 12:33 am

update python version 2to3

Post by cascraft » Sun Sep 10, 2017 9:57 pm

Hello friends,

does anyone how to update that python script(form http://zenhax.com/viewtopic.php?t=1287) to version 3.x ?

Image


i was trying to update it but it gives me error:
Image


:(

philgrf
ultra-n00b
Posts: 5
Joined: Mon Mar 06, 2017 6:11 pm
Been thanked: 3 times

Re: update python version 2to3

Post by philgrf » Tue Sep 12, 2017 7:46 pm

I understand that you try to convert the script "starter.py" from python 2 to python 3.

This script not a standalone.

It imports the library "NewGameLib" with the first instruction of the script : import NewGameLib.
Some of the function used in "starter.py" are defined in "NewGameLib".

The script probably won't work outside of blender as it relies too on blender : import blender.
And it seems the NewGameLib itself relies too on blender.

I feel not only the python script need to be translated from python 2 to python 3 but also blender instruction need to be translated from blender 2.49 API to blender 2.7x API.

This website provides some insight about changes from blender API 2.49 to blender API 2.5x (there were later changes that one was the major change) :
https://mogurijin.wordpress.com/2010/08 ... s-to-2-5x/

I have had some success some years ago converting with this script :
https://blenderartists.org/forum/showth ... -progress)
I was using blender 2.5x then.

Not used lately.

Post Reply