Python

Okay Okay Okay
I’m learning Python scripting language. It’s been great so far, very fun to be learning code again. Anyhow, today I got to the “Input and Output” section, where you learn how to deal with files and such. Well, I’m playing around with a file, and I decide I want to write a period between each character in the file, so here’s what I do:

for i in tmp:
tmp.seek(1,1)
tmp.write(‘.’)

You guessed it! The hard drive starts to spin…
and spin…
and spin…
and spin…
and spin…
and spin…

So I busted out the task manager and killed the process. When it was all over, I was left with a 91.348 megabyte text file filled with periods… so cool.

The best part is… The text of this post is copied directly from a Python generated file.

About Ziggy

I strive to be awesome for God. Support my efforts at: http://sub.tryop.com
This entry was posted in Other and tagged . Bookmark the permalink.

3 Responses to Python

  1. Dan says:

    Python is a very peculiar, yet cool language. I would like to learn it eventually, as well.

    Sounds like you are having a lot of fun with it. 🙂

  2. Toad says:

    I may have written a lousy C program to calculate the odds of rolling certain numbers of a variety of kinds of dice that wound up filling up memory, the page file, and crashing Windows, but I don’t think I’ve ever intentionally started filling up my hard drive with periods. 😉

    Glad to hear you’re having fun!

  3. sunny says:

    Okay, I admit it, I am a code junkie. I love learning new codes. I never would have guess it a year ago.

    ::Waves::

    Hi ziggy

Leave a Reply

Your email address will not be published. Required fields are marked *