try: a = 1 except ImportError as A: print xrange import tmp2; import tmp1