#!/usr/bin/python
#Function:
#a.import module with string name.
#b.modify module variable.
#file name of module "mymodule is:"
##!/usr/bin/python
#m="a"
#print m


#import mymodule #ok, but we want to import it with string variable.
#import mod #error! cann't use string directly
mod="mymodule"
exec "import " + mod
print "before:", mymodule.m
mymodule.m = 2222
print "after:", mymodule.m
