Skip to content

Instantly share code, notes, and snippets.

@Cam1337
Created May 14, 2010 19:21
Show Gist options
  • Save Cam1337/401540 to your computer and use it in GitHub Desktop.
Save Cam1337/401540 to your computer and use it in GitHub Desktop.
Currently, I have this:
import mymod1
import mymod2
cam="cam"
foo="foo"
mymod1.cam,mymod1.foo=cam,foo
mymod2.cam,mymod2.foo=cam,foo
I want it to be like this
import mymod1
import mymod2
cam="cam"
foo="foo"
def GetImports():
return imported
def RelayVariables():
for i in GetImports():
eval("%s.cam=cam"%i)
eval("%s.foo=foo"%i)
RelayVariables()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment