Archive
Friday fun :)
You can not imagine im actually just scripting away again today :) Yes, some could call it geeky, but in this case i actually have to finish something, of which once again i found out i approached it wrong. I know right, happens all the time. In this case im just twisting myself in a maze of lists which i wont bore you with since its not part of my posting plan :)
Every now and then when i write something in Python i get to the ‘import’ lines and type ‘#from pub import beer’. Its funny and geeky all at the same time, and no one would notice unless he checks out my clumsily written source :)
But now i thought, what the heck :) lets just make a ‘pub.py’ with only one definition ‘beer’ and this is what it looks like :D
-
# filename : pub.py
-
# beer can be true
-
import random
-
-
def beer():
-
rangebeer = ['0','1']
-
beer = random.choice(rangebeer)
-
return int(beer)
And now all u do in my other scripts is call it :
-
from pub import beer
-
-
a = beer()
-
if a == 1:
-
print "The beer, it is true!"
-
#…
It must be friday :D
in via mail :)
> From: xxxx@sssss.nl > Date: January 29, 2010 13:25:02 GMT+01:00 > To: xxxxx@xxxxxx.nl > Subject: about password complexity > > During a recent password audit in a company - it was found that a person > was using the following password: > "MickieMinniePlutoHueyLouieDeweyDonaldGoofySacramento" > When asked why such a long password - she said she was told it had to be > 8 characters and include at least one capital... > > > > Regards, > C.-


