I've got to download SearchQueryPerformanceReposrts for some accounts. Some 
of them haven't had keywords triggered in the selected during clause (e.g. 
YESTERDAY). In that case I'd like to avoid downloading the file rather than 
deleting the file if it is empty. What I'm looking for is to speed up my 
code. Any suggestions?

This is what I'm currently doing in Python and although it get the job done 
it isn't good enough for me.

    with open(path.replace('.csv.gz', '.tsv'), 'rb') as testing:
        tsv_reader = csv.reader(testing, delimiter = '\t', quotechar = '"')
        tsv_reader.next(); tsv_reader.next()
        if tsv_reader.next()[0] == 'Total':
            testing.close()
            try:
                os.unlink(path.replace('.csv.gz', '.tsv'))
            except:
                raise

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to