More Dongs on a Friday. Surprise!!
Due to popular demand, mkdong has been modularized!! I present to you dong.py version 0.0.1.
Enjoy:
#!/usr/bin/env python
''' MKdong turned into a module. I think I was smoking crack and/or high on Red Bull this day.
Dong goes into underpants Dong goes into boxers Dong goes into vagina Sperm comes out of dong Sperm goes into vagina Sperm goes into egg Dong goes into mouth Pee comes out of dong Pee goes into toilet Why am I iterating this crap? '''
import os, sys
blue = '\\e[0;34m' # blue
class Dong:
def __init__(self, maxlen=40, color=blue):
self.maxlen = maxlen
self.color = color
self.dong = None
def mkdong(self):
self.dong = '(_)/(_)'
for i in range(self.maxlen): self.dong += '/'
self.dong += 'D'
os.system('echo -e "%s%s"' % (self.color, self.dong))
class Sperm(Dong): def init(self, count=500): self.count = count self.spermcount() Dong.init(self)
def __repr__(self):
return '' % self.count
def tighty_whities(self):
print 'Tighty Whities lowered your sperm count!'
self.count -= 50
def boxers(self):
print 'Boxers raised your sperm count!'
self.count += 50
def spermcount(self):
print 'Sperm count is %d' % self.count
def bike_seat(self):
print 'asdjfoisadjs'
pass
def radiation(self):
print ':-x'
pass
def castration(self):
print ':('
pass
def smoke(self):
print 'awwww yeahhhhh.'
pass
class Egg(Sperm): pass
if name == 'main':
try:
donglen = int(sys.argv[1])
except:
print "usage: mkdong "
sys.exit()
if donglen > maxlen:
print 'warning: a %s" dong is too big! cannot be longer than %s"!' % (donglen, maxlen)
sys.exit()
else:
d = dong(donglen)
d.mkdong()</pre>
There’s really no excuse. I should be ashamed of myself but I’m not.
09.4.09Blue Dongs for a Friday Afternoon
Today I wrote an awesome program called mkdong that will make a dong of your desired length and print it to your terminal, like this:
% ./mkdong usage: mkdong <length> % ./mkdong 5 ()/()/////D % ./mkdong 25 ()/()/////////////////////////DThat last one is impressive, isn’t it? Hmm… Yeah, it’s Friday. What do you want from me? I still got work done! Cool thing is if the dong is too big, well then it throws an error:
% ./mkdong 60 warning: a 60" dong is too big! cannot be longer than 40"!“What is the point of this?”, you might ask yourself. That’s a good question. I’ve been so busy with other shit lately that I’ve barely had time to code. I suppose I was itching to write something, anything… Dongs!!
It all started harmlessly enough with a silly AIM conversation with my coding buddy at work. We were talking about a bug, and well, read on and you’ll see. It regressed quickly.
So I took the stupidity and ran with it and mkdong was born!
The initial dongs were a little primitive and sickly looking. So I took his suggestion and improved their visual style. Here is how it turned out:
#!/usr/bin/env python
import sys
maxlen = 40
try: donglen = int(sys.argv[1]) except: print "usage: mkdong <length>" sys.exit()
if donglen > maxlen: print 'warning: a %s" dong is too big! cannot be longer than %s"!' % (donglen, maxlen) sys.exit() else: dong = '()/()' for i in range(1, donglen): dong += "\" dong += 'D'
print dong We laughed. We joked. We Tweeted. And then it regressed even further:
A feature request! I had to make it print in blue! But to do that I had to replace all of the “\” that make up the dong itself, with “/” so as to not have the ANSI escape codes eat up the extra backslashes. (Backslashes are interpreted characters, duh.) I also had to replace the print statement with a system call to echo -e so that the colorization would be interpreted. This is high tech shit, man!!
And then I released it to the public. So there you have it. Here is the final release of mkdong 2.0 for your pleasure:
#!/usr/bin/env python
import os, sys
maxlen = 40 color = '\\e[0;34m' # blue
try: donglen = int(sys.argv[1]) except: print "usage: mkdong <length>" sys.exit()
if donglen > maxlen: print 'warning: a %s" dong is too big! cannot be longer than %s"!' % (donglen, maxlen) sys.exit() else: dong = '()/()' for i in range(donglen): dong += '/' dong += 'D'
os.system('echo -e "%s%s"' % (color, dong)) Use it well. And remember they aren’t bugs, they’re dongs! Squish? Gross.
| Posted in Life, Python | 3 Comments »
| Posted in Python | No Comments »