Example #1
0
    def ur(self,filepath=[]):
        """ user read file """
        if filepath==[]:
            filepath=mf().gf()


        self.fs=lsf.file_to_str_list(filepath)
        self.fp=filepath
Example #2
0
    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
Example #3
0
 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