A hack to make a class instance available to any script -- any better way?

I wanted to declare a class instance and make it available from anywhere (like other scripts and the python console). Here’s what I hacked together:

import bpy

class stowAway:
    """Stow Away class"""
    internalVal = 10
    def selfInc(self):
        self.internalVal += 10
    def ack(self):
        return 'stoAway class reporting'
    def getVal(self):
        return self.internalVal

scn = bpy.context.scene
x = stowAway()

def passer(scn):
    global x
    return x

# get the class from "anywhere" using:
# bpy.app.handlers.frame_change_pre[0](bpy.context.scene)

for n in range(len(bpy.app.handlers.frame_change_pre)):
    if bpy.app.handlers.frame_change_pre[n].__name__ == "passer":
        del bpy.app.handlers.frame_change_pre[n]
        break

bpy.app.handlers.frame_change_pre.append(passer)

I append the function “passer” to one of the handlers, in this case “frame_change_pre”. When the function is called it returns the instance of the class, so when it’s called by “frame_change_pre” it doesn’t do anything. From anywhere else, I access it like this:

bpy.app.handlers.frame_change_pre[0](bpy.context.scene).ack()

Obviously this is a hack, but is there a better way to do this without registering an addon? It’s likely that I don’t understand Blender namespaces, so if there’a another way to do it please let me know…

How about

class X:
    foo = 1

x = X()
x.foo = 2

bpy._your_global = x

# another script / file
print(bpy._your_global.foo)

I can’t believe it was that simple… I’m not new to programming and I’m not new to blender, but I am new to python. It didn’t even occur to me to just add it to the module itself, I kept trying to get it into bpy.data, I assumed that was what it was there for. Instead I constructed a rube-goldberg machine just to flip a switch. At least I can say that the aforementioned machine did work.