SOLVED - What version of python does RENPY use?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Enchant00
Regular
Posts: 136
Joined: Tue Jan 12, 2016 1:17 am
Contact:

SOLVED - What version of python does RENPY use?

#1 Post by Enchant00 »

As the title says, I'm curious as to what version of python is being used for the RENPY engine? I first thought that renpy takes the current version of your python and adjusts itself upon every update but I guess that was a misconception of my part. I realized this when I was working with python dictionaries. The nature of dictionaries is that they are unordered so relying of iterations with a specific order in mind may not be practical unless you did some kind of sorting. In python 3.6, it somewhat retains your order of items in your dictionary while offering backwards compatibility with randomize orders from previous python versions. Anyway, I've used a TON of dictionaries and in the past I would have sorted first but at the moment I programmed under a 3.6 kind of mindset so as a result renpy does not really display the output I want so I have to go through them all and re-sort and organize them.

In summary:
1)What is the current version of python that RENPY uses?
2 Is there a way at anytime to know said version?
Last edited by Enchant00 on Fri May 25, 2018 12:52 pm, edited 1 time in total.

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: What version of python does RENPY use?

#2 Post by Remix »

2.7 iirc (one of the horrible ones that casts basic math to int if one component is integer)

You might note that Ren'py internally converts many dictionaries to renpy.python.RevertableDict objects which do maintain key order
Frameworks & Scriptlets:

User avatar
Enchant00
Regular
Posts: 136
Joined: Tue Jan 12, 2016 1:17 am
Contact:

Re: What version of python does RENPY use?

#3 Post by Enchant00 »

Remix wrote: Fri May 25, 2018 11:10 am 2.7 iirc (one of the horrible ones that casts basic math to int if one component is integer)

You might note that Ren'py internally converts many dictionaries to renpy.python.RevertableDict objects which do maintain key order
2.7 Wow so it's quite outdated. Hmm I wasn't really aware that renpy converts the dic to a renpy.python.RevertableDict since in my case it doesn't seem to retain its order. I'm not sure if my problem is with the way my dictionaries are created since most of them are arising dict comprehensions or maybe it could be something else regardless at least I know now the python version that RENPY uses and to me that's really what I needed to know. THANKS :lol:

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: SOLVED - What version of python does RENPY use?

#4 Post by Remix »

I meant it converts to an ordered dictionary for saving/loading (as it uses pickle which will only support rigid objects and stuff) and then converts back for access during play (if I understand things correctly)

I mentioned the object as you could have a play setting your current dicts directly as those and see if it helps... (so saying, I just had a play and couldn't just drop a **{dict} in as kwargs and get a usable ordered set of keys out so it might mean having to do some sorting during display)
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: barsunduk, bloodzy, dragondatingsim