How do I retrieve an automated report and save it to a database?

Posted by Mason Wheeler on Stack Overflow See other posts from Stack Overflow or by Mason Wheeler
Published on 2010-03-18T23:33:36Z Indexed on 2010/03/18 23:41 UTC
Read the original article Hit count: 258

I've got a web server that will take scripts in Python, PHP or Perl. I don't know much about any of those languages, but of the three, Python seems the least scary. It has a MySql database set up, and I know enough SQL to manage it and write queries for it.

I also have a program that I want to add automated error reporting to. Something goes wrong, it sends a bug report to my server.

What I don't know how to do is write a Python script that will sit on the web server and, when my program sends in a bug report, do the following:

  • Receive the bug report.
  • Parse it out into sections.
  • Insert it into the database.
  • Have the server send me an email.

From what little I understand, this seems like it shouldn't be too difficult if I only knew what I was doing. Could someone point me to a site that explains the basic principles I'd need to create a script like this?

© Stack Overflow or respective owner

Related posts about python

Related posts about web-development