Can I use Python 3 code in Ren'Py?

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
DannyGMaster
Regular
Posts: 113
Joined: Fri Sep 02, 2016 11:07 am
Contact:

Can I use Python 3 code in Ren'Py?

#1 Post by DannyGMaster »

I've recently began studying Python in hope I can add some gameplay mechanics to the game I'm making with Ren'Py with my own code. From what I've seen, and maybe I'm wrong, the Ren'Py code syntax seems to be based in Python 2, but I'd really like to know if I can use Python 3 code and expect everything to work properly, or do I have to convert the code to Python 2.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Can I use Python 3 code in Ren'Py?

#2 Post by PyTom »

Ren'Py runs in Python 2, with many of the Python 3 compatibility options enabled. Right now, you should target the Python 2 / Python 3 intersection.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
DannyGMaster
Regular
Posts: 113
Joined: Fri Sep 02, 2016 11:07 am
Contact:

Re: Can I use Python 3 code in Ren'Py?

#3 Post by DannyGMaster »

PyTom wrote:Ren'Py runs in Python 2, with many of the Python 3 compatibility options enabled. Right now, you should target the Python 2 / Python 3 intersection.
I see, thank you so much for replying, I recently discovered some of the options I wanted to implement were already in Ren'Py's source code, I just hadn't looked well enough, you've made an amazing job by the way!

Post Reply

Who is online

Users browsing this forum: No registered users