コード例 #1
0
ファイル: TellMeAJoke.py プロジェクト: bowbahdoe/Carol
 def action(self):
     self.puns =[
     ["Why did the chicken cross the road?", "To get to the other side"],
     ["A man walked into a bar", "it hurt"],
     ["What is the name of a baby whose parents are a vampire and a snowman", "Frostbite"],
     ["Did you hear about the circus fire", "It was in tents"],
     ["Which vedge tables do golfers like best", "Greens!"],
     ["Why is a book like a tree", "Because it is full of leaves"],
     ["What do you get when you cross the sea with a burgular", "A crime wave"],
     ["What is a vampires least favorite puzzle", "a cross word"],
     ["What do you get when you cross an elephant and a rhino", "Hell if I know"]
     ]
     joke = random.choice(self.puns)
     print joke[0]
     say(joke[0])
     print joke[1]
     sleep(0.5) #200 milliseconds
     say(joke[1])
コード例 #2
0
ファイル: ShutdownComputer.py プロジェクト: bowbahdoe/Carol
 def action(self):
     say("Shutting down computer")
     os.system("poweroff")
コード例 #3
0
ファイル: SingMeASong.py プロジェクト: bowbahdoe/Carol
 def action(self):
     say("daiii sey");sleep(.2)
     say("daiii sey");sleep(.2)
     say("give me your answer dooooo");
     sleep(.2)
     say(r'IM half crazy; all for the love of you');sleep(.2)
     say(r'It wont be a stylish marrige;');sleep(.2)
     say(r'I cant afford a carrige; But you ull look sweet; upon the seat; of a bicycle built for two')
コード例 #4
0
ファイル: OpenWebsite.py プロジェクト: bowbahdoe/Carol
 def action(self):
     print "Opening Website: " + self.site
     webbrowser.open(self.site)
     say("Opening" + self.site[self.site.index("www.")+4:])
コード例 #5
0
ファイル: ILoveYou.py プロジェクト: bowbahdoe/Carol
 def action(self):
     say("I love you too")
コード例 #6
0
 def action(self):
     say("Ice. Cold.")