""" try: self.checkargs(line,"<filename>") except Error,e: print e return # Create the file filename = line.split(" ")[-1] filename = filename + PODSCRIPTEXT try: historyfile = open(filename,"w") except IOError,e: print e return # suppress the last command (its savehistory itself) settings.history = settings.history[:-1] for line in settings.history: # do not write source or EOF command if not (re.match(r'.*\.source',line) or re.match(r'.*EOF',line)): # suppress POD root wline = ".".join(line.split('.')[1:]) # suppress the project name regexp = re.compile('(.*)\:(.*?)(\..*)') wline = regexp.sub(r'\1\3',wline) historyfile.write(wline+"\n") print "History wrote" def do_ls(self,line): """ ls list files and directory in the current directory """