from os import path def foo(): for i in range(10): print i def bar(): print dir(path)