讲笑话的示例包
FunnyBonesProject的Python项目详细描述
Author: | Abhijit Baxi |
---|---|
Contact: | baxiabhijit@gmail.com |
Authors: | Abhijit Baxi |
Organization: | Baxi Developers |
Date: | 2016-03-07 |
Status: | This is a “work in progress” |
Revision: | 7302 |
Version: | 1.0.2 |
Copyright: | This document has been placed in the public domain. You may do with it as you wish. You may copy, modify, redistribute, reattribute, sell, buy, rent, lease, destroy, or improve it, quote it at length, excerpt, incorporate, collate, fold, staple, or mutilate it, or do anything else to it that your or anyone else’s heart desires. |
About: | This is a simple project which tells a joke. |
奉献精神
谢谢Stack Overflow教我如何使用这个。 链接:http://stackoverflow.com/questions/4155914/how-to-create-a-python-2-x-package-simple-case 原作者:Marius Gedminas
摘要
本文是Funnybone项目的演示。
安装
pip install FunnyBonesProject
- 升级
- pip install --upgrade FunnyBonesProject
用法
在python shell中,键入以下内容:
>>> from Jokes import * >>> >>> funnyJoke = get_a_joke() >>> print funnyJoke
Brian’s stress level was at unsurpassed levels. His wife Maggie was in labor and Brian was sure it was time to head to the hospital. Breathing heavily, Brian grabbed the phone and called the doctor. “MY WIFE, SHE’S READY, SHOULD WE COME?” The doctor tried to relax the poor fellow, “just try to relax, now tell me how much time elapses between the contractions?” “SHIRLEY!” Brian screamed on the top of his lungs, “HOW MUCH TIME IN BETWEEN THE CONTRACTIONS? TEN MINUTES? OK, TEN MINUTES IN BETWEEN!” “And is this her first child?” Questioned the doctor. “NO YOU STUPID NITWIT, THIS IS HER HUSBAND!”