def import_from_stdlib(module):
 old_path = sys.path
 sys.path = [d for d in sys.path if (d not in ('', '.'))]
 m = __import__(module)
 sys.path = old_path
 return m

def import_from_stdlib ( module ) : old_path = sys . path sys . path = [ d for d in sys . path if ( d not in ( '' , '.' ) ) ] m = __import__ ( module ) sys . path = old_path return m
when python is run from within the nltk/ directory tree .