A question about generic python vs blender game.

Hi all.
Quick question:
How would i:
a)run a script continuously in python, like using an always true pulse in bge
b)have variables that are not destroyed when the script ends, like object + bge.logic properties?

For example, i know i can use a while funcition (a) but i feel that this is not the correct route.
Also, for (b)
i’m aware i can do:

class properties:
    dict = {
    def get(self,prop):
self = properties().get

look in the text editor text > script templates and try the modal template scripts.

I’m really asking what is the equivalent of true pulse script execution+
object/gamelogic properties in normal python (not blender)

I think you can use the threading python module for this, a class to store datas, and eventually have a look here. (I always code python in blender sooo I cant say its an accurate answer :slight_smile: )

Thank you!
i presume you mean threading.local().variable
anyway, now i need help with running the script continously, without a while loop.