You could have written that mel script in python ;)
But why not just do this
import maya.cmds as mc
mc.currentTime(q=1)
Granted, it's not as pretty, but your method is creating an extra node,
that calls the mel interpreter, which then calls the python interpreter.
Then whatever script you write that relies on your method needs to check
if the node already exists, and if it doesn't, create it.
If I really wanted to have a variable pyFrame I would probably make that
in a new python object.
But then we're back to the problem where you need to make sure your maya
nodes and/or python modules are loaded, making your scripts less self
contained and harder to share.
dado
PS: thanks for starting this group.
Even though I've been doing python and mel for a while, I'm just
starting to use python in maya.
dado