def ur(self,filepath=[]): """ user read file """ if filepath==[]: filepath=mf().gf() self.fs=lsf.file_to_str_list(filepath) self.fp=filepath
def save(self,filepath=[]): """ save to file to filepath if filepath is given if no filepath is given user menu to select file path """ if filepath==[]: filepath=mf().get_save_path() textString=''.join(self.fs) lsf.str_to_file(textString,filepath) print 'saved to::',filepath
def rem(self,filepath=[]): """ used to delete file at filepath """ print "warning this action will delete file " print "type xx to exit" a=raw_input() if a=='xx': print 'did not delete file' return False if filepath==[]: filepath=mf().gf() os.remove(filepath) print 'deleted file:::',filepath