On Tue, Jun 4, 2013 at 2:19 PM, Noufal Ibrahim <nou...@nibrahim.net.in> wrote: > Fagun Bhavsar <fagun.bhav...@gmail.com> writes: > >> Hi, >> >> I have couple of reports that need to be sent during end of the >> day. There's single DB table, from which data is being picked and put >> into xcel-like tabular format and sent to specific email address. >> >> I want to understand - by using python, how to go about for automating >> this task? What are the key points to be considered here? This is just >> for learning purpose, hence I am looking forward to similar examples, >> if someone can guide me. > > It seems quite straightforward. Connect to the db, run your query, > convert the response into a csv or tsv (there is a csv module in the > standard libary) file and then email (there's an smtp module in the > stdlib too) it. It'd look the same in most scripting languages.
In addition to the above, run it off as a cron job (on *nix machines) at the end of your day. svaksha ॥ http://svaksha.com ॥ _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers