| Couch Potato |
Yeah, yeah, I know. So far, all we've been doing in this tutorial is mucking around with Python's data structures, dumb creatures with names like "tuples" and "lists", and messing about with twisty things like the "for" and "while" loops. And you're fed up.
All these concepts and structures, beautifully-designed and wonderfully-elegant though they may be, leave you cold. You just don't see the point of this exercise. As a matter of fact, you're thinking, now is probably a good time to drop this thing and get on with something more worthwhile - "Ally McBeal", perhaps?
I hear you.
Over the next few pages, we're going to leave the rarefied world of Python data structures and enter something a lot more tangible - the filesystem. I'm going to be showing you how to use Python to interact with files on your filesystem, opening them, reading them and writing to them.
No longer will you be playing abstract games with list slices and dictionary keys - by the end of this article, you'll be able to watch as your Python code creates new files in front of your eyes, or rub your hands in glee as you read other people's private documents. You will have the power to wipe out each and every file on your hard drive, or selectively nuke only the ones you don't like. You will be respected...and, more importantly, you will be feared.
Even "Ally McBeal" can't top that!
How to do Everything with PHP & MySQL
How to do Everything with PHP & MySQL, the best-selling book by Melonfire, explains how to take full advantage of PHP's built-in support for MySQL and link the results of database queries to Web pages. You'll get full details on PHP programming and MySQL database development, and then you'll learn to use these two cutting-edge technologies together. Easy-to-follow sample applications include a PHP online shopping cart, a MySQL order tracking system, and a PHP/MySQL news publishing system.
Read more, or grab your copy now!