Created by: chengduoZH
name " file " is not defined in interactive mode. so change the "cur_dir = os.path.dirname (os.path.realpath (file))" to 'cur_dir = os.getcwd()"