Warning: ob_start(): output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /home/public/wp-includes/functions.php on line 821
Blended Technologies » Blog Archive » Python Madness - Crash your computer in just 3 lines of code

Python Madness - Crash your computer in just 3 lines of code


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

So a coworker mentioned he wanted a file that would launch multiple programs for him. Being helpful like I am, I whipped up a quick Python script:

import os
os.startfile(”C:\Program Files\IrfanView\i_view32.exe”)
os.startfile(”C:\Program Files\Google\Google Talk\googletalk.exe”)
#…etc

I sent it off to him and he was happy. But being curious as I am, I decided to make the script call itself and see what would happen…

File: startfiles.py

import os
os.startfile(”startfiles.py”)
os.startfile(”startfiles.py”)

Warning, save all your work on your computer before you try running this!

And here are my results: (can you beat my 258 processes?)

Python Maddness

del.icio.us |  Digg |  FURL |  Yahoo! My Web 2.0 |  Reddit

5 Responses to “Python Madness - Crash your computer in just 3 lines of code”

  1. Tom Says:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    You can do this in c too by recursively calling fork() :)

  2. Brian Says:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    This is the equivalent of the old unix classic fork bomb:
    #!/bin/sh
    $0 & $0

  3. Uchi Says:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    Hmm, to bad this didn’t crash my computer. I guess I have to much memory. ;)

  4. Greg - CEO/Founder Says:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    Uchi, what happened? Did your computer at least slow down to the point where you couldn’t use it?

  5. Computer Maintenance Tips Says:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    Computer Maintenance Tips…

    I couldn’t understand some parts of this article, but it sounds interesting…