Playing with Python

For my first assignment in Reading and Writing Electronic Text, I made a simple script that substituted some terms, Mad Libs-style, in Reed Hasting’s now infamous Qwikster blog post. Here’s the code, and the output.

import sys

<ol>
<li>sys.stdin is input from the user</li>
</ol>



for line in sys.stdin:
    line = line.strip()
    line = line.replace("feedback","bellyaching")
    line = line.replace("members","fleshy moneypods")
    line = line.replace("customers","fleshy moneypods")
    line = line.replace("DVD","providing actual movies")
    line = line.replace("streaming","providing crappy, limited content over the internet")
    line = line.replace("success","making boatloats of cash")
    line = line.replace("business","cash cow")
    line = line.replace("businesses","cash cows")
    line = line.replace("companies","conscience-less figments of our imagination that act on our collective behalf")
    line = line.replace("Companies","conscience-less figments of our imagination that act on our collective behalf")
    line = line.replace("evolving","mutating")
    line = line.replace("fear","scarytime moment")
    line = line.replace("recover","backpedal")
    line = line.replace("thing","fad")
    line = line.replace("wrong","fucked up")
    line = line.replace("right","so very on point")
    line = line.replace("actions","big moves")
    line = line.replace("words","little wussy bullshit")
    line = line.replace("service","like, basic functionality")
    line = line.replace("charging","emptying your wallet")
    line = line.replace("movie","kinda good thing")
    line = line.replace("huge","like, so massive")
    line = line.replace("forever","for another three months")
    line = line.replace("integrated","like, totally mushed up")
    line = line.replace("team","bunch of goobers")
    line = line.replace("!",", haw haw!")
    print line