Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/g/m/gmvault-HEAD/src/gmv/gmvault_db.py   gmvault(Download)
            the_dir = self._db_dir
 
        meta_path = self.METADATA_FNAME % (the_dir, email_info[imap_utils.GIMAPFetcher.GMAIL_ID])
 
        meta_desc = open(meta_path, 'w')
        #create json structure for metadata
        meta_obj = { 
                     self.ID_K         : email_info[imap_utils.GIMAPFetcher.GMAIL_ID],
                     self.LABELS_K     : labels,
                     self.FLAGS_K      : email_info[imap_utils.GIMAPFetcher.IMAP_FLAGS],
        meta_desc.close()
 
        return email_info[imap_utils.GIMAPFetcher.GMAIL_ID]
 
    def bury_chat(self, chat_info, local_dir = None, compress = False):   
            the_dir = self._db_dir
 
        data_path = self.DATA_FNAME % (the_dir, email_info[imap_utils.GIMAPFetcher.GMAIL_ID])
 
        # if the data has to be encrypted
        data_desc.close()
 
        return email_info[imap_utils.GIMAPFetcher.GMAIL_ID]
 
    def get_directory_from_id(self, a_id, a_local_dir = None):

src/g/m/gmvault-1.8.1-beta/src/gmv/gmvault_db.py   gmvault(Download)
            the_dir = self._db_dir
 
        meta_path = self.METADATA_FNAME % (the_dir, email_info[imap_utils.GIMAPFetcher.GMAIL_ID])
 
        meta_desc = open(meta_path, 'w')
        #create json structure for metadata
        meta_obj = { 
                     self.ID_K         : email_info[imap_utils.GIMAPFetcher.GMAIL_ID],
                     self.LABELS_K     : labels,
                     self.FLAGS_K      : email_info[imap_utils.GIMAPFetcher.IMAP_FLAGS],
        meta_desc.close()
 
        return email_info[imap_utils.GIMAPFetcher.GMAIL_ID]
 
    def bury_chat(self, chat_info, local_dir = None, compress = False):   
            the_dir = self._db_dir
 
        data_path = self.DATA_FNAME % (the_dir, email_info[imap_utils.GIMAPFetcher.GMAIL_ID])
 
        # if the data has to be encrypted
        data_desc.close()
 
        return email_info[imap_utils.GIMAPFetcher.GMAIL_ID]
 
    def get_directory_from_id(self, a_id, a_local_dir = None):

src/g/m/gmvault-HEAD/src/sandbox/common_gmvault.py   gmvault(Download)
 
        if curr:
            gmail_id = curr[the_id][imap_utils.GIMAPFetcher.GMAIL_ID]
        else:
            gmail_id = None
 
            if curr:
                gmail_id = curr[the_id][imap_utils.GIMAPFetcher.GMAIL_ID]
            else:
                gmail_id = None
                        LOG.debug("\nProcess imap chat id %s" % ( the_id ))
 
                        gid = new_data[the_id][imap_utils.GIMAPFetcher.GMAIL_ID]
 
                        the_dir      = self.gstorer.get_sub_chats_dir()
                        #pass the dir and the ID
                        curr_metadata = GMVaulter.check_email_on_disk( self.gstorer , \
                                                                       new_data[the_id][imap_utils.GIMAPFetcher.GMAIL_ID], \
                                                                       the_dir)
 
                    LOG.debug("\nProcess imap id %s" % ( the_id ))
 
                    gid = new_data[the_id][imap_utils.GIMAPFetcher.GMAIL_ID]
 
                    the_dir      = gmvault_utils.get_ym_from_datetime(new_data[the_id][imap_utils.GIMAPFetcher.IMAP_INTERNALDATE])

src/g/m/gmvault-HEAD/src/gmv/gmvault.py   gmvault(Download)
 
        if curr:
            gmail_id = curr[the_id][imap_utils.GIMAPFetcher.GMAIL_ID]
        else:
            gmail_id = None
 
            if curr:
                gmail_id = curr[the_id][imap_utils.GIMAPFetcher.GMAIL_ID]
            else:
                gmail_id = None
                    LOG.debug("\nProcess imap id %s" % ( the_id ))
 
                    gid      = new_data[the_id][imap_utils.GIMAPFetcher.GMAIL_ID]
                    eml_date = new_data[the_id][imap_utils.GIMAPFetcher.IMAP_INTERNALDATE]
 
                    #pass the dir and the ID
                    curr_metadata = GMVaulter.check_email_on_disk( self.gstorer , \
                                                                   new_data[the_id][imap_utils.GIMAPFetcher.GMAIL_ID], \
                                                                   the_dir)
 
            # syntax for 2.7 set comprehension { data[key][imap_utils.GIMAPFetcher.GMAIL_ID] for key in data }
            # need to create a list for 2.6
            db_gmail_ids.difference_update([data[key][imap_utils.GIMAPFetcher.GMAIL_ID] for key in data ])
 
            if len(db_gmail_ids) == 0:

src/g/m/gmvault-1.8.1-beta/src/gmv/gmvault.py   gmvault(Download)
 
        if curr:
            gmail_id = curr[the_id][imap_utils.GIMAPFetcher.GMAIL_ID]
        else:
            gmail_id = None
 
            if curr:
                gmail_id = curr[the_id][imap_utils.GIMAPFetcher.GMAIL_ID]
            else:
                gmail_id = None
                    LOG.debug("\nProcess imap id %s" % ( the_id ))
 
                    gid      = new_data[the_id][imap_utils.GIMAPFetcher.GMAIL_ID]
                    eml_date = new_data[the_id][imap_utils.GIMAPFetcher.IMAP_INTERNALDATE]
 
                    #pass the dir and the ID
                    curr_metadata = GMVaulter.check_email_on_disk( self.gstorer , \
                                                                   new_data[the_id][imap_utils.GIMAPFetcher.GMAIL_ID], \
                                                                   the_dir)
 
            # syntax for 2.7 set comprehension { data[key][imap_utils.GIMAPFetcher.GMAIL_ID] for key in data }
            # need to create a list for 2.6
            db_gmail_ids.difference_update([data[key][imap_utils.GIMAPFetcher.GMAIL_ID] for key in data ])
 
            if len(db_gmail_ids) == 0:

src/g/m/gmvault-HEAD/src/gmvault_tests.py   gmvault(Download)
        ids = gimap.search(criteria)
 
        res = gimap.fetch(ids, [gimap.GMAIL_ID])
 
        self.assertEquals(res, {27362: {'X-GM-MSGID': 1147537963432096749L, 'SEQ': 14535}, 27363: {'X-GM-MSGID': 1147537994018957026L, 'SEQ': 14536}})
        self.assertEquals(len(ids), 2)
 
        res = gimap.fetch(ids[0], [gimap.GMAIL_ID, gimap.EMAIL_BODY, gimap.GMAIL_THREAD_ID, gimap.GMAIL_LABELS])
 
        self.assertEquals(res[ids[0]][gimap.GMAIL_ID], 1147537963432096749L)