Python趣文:Import Girlfriend
如果……
你像卡馬克一樣努力編程
然后……
你就會賺大錢
再然后……
你就能買下豪華跑車和別墅
而且……
你還會有宋慧喬
或者蒼井空
一樣的女朋友
哦噢,但是……
- felinx@FELINX:~$ sudo easy_install girlfriends
- Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
- [GCC 4.4.1] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import girlfriends
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "build/bdist.linux-i686/egg/girlfriends/__init__.py", line 20, in <module>
- girlfriends.MoreThanOneGirlfriendIsNotAllowedException
- >>>
如何使用“import girlfriend”
可能你是通過社交網絡或者搜索引擎找到這里的,不過來這里最簡單的方法是,在Python里輸入“import girlfriend”。當然,在輸入這條指令前,你必須先使用“easy_install girlfriend”或者”pip install girlfriend”來安裝”girlfriend”模塊,安裝過程中會為你自動添加“努力工作”、“錢”、“車”和“房”等模塊所依賴的包。
- felinx@FELINX:~$ sudo easy_install girlfriend
- Searching for girlfriend
- Reading http://pypi.python.org/simple/girlfriend/
- Reading http://girlfriend.im/
- Best match: girlfriend 1.0
- Downloading http://pypi.python.org/packages/source/g/girlfriend/girlfriend-1.0.zip#md5=5c71e827fffd78fe7293c74ce165f733
- Processing girlfriend-1.0.zip
- Running girlfriend-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-XOtU9Q/girlfriend-1.0/egg-dist-tmp-pNW2zF
- zip_safe flag not set; analyzing archive contents...
- Adding girlfriend 1.0 to easy-install.pth file
- Installed /env/python2.6/lib/python2.6/site-packages/girlfriend-1.0-py2.6.eggGearset365
- Downloading http://pypi.python.org/packages/source/h/house/house-1.0.zip#md5=8ff7fd47ebff56c2f3eda9e1d9ecbfe3
- Processing house-1.0.zip
- Running house-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Tu0zoU/house-1.0/egg-dist-tmp-WCdMyo
- zip_safe flag not set; analyzing archive contents...
- Adding house 1.0 to easy-install.pth file
- Installed /env/python2.6/lib/python2.6/site-packages/house-1.0-py2.6.egg
- Searching for car>=1.0
- Reading http://pypi.python.org/simple/car/
- Best match: car 1.0
- Downloading http://pypi.python.org/packages/source/c/car/car-1.0.zip#md5=c0fb318a3405b7da143cccfd645b8a69
- Processing car-1.0.zip
- Running car-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-frOEcA/car-1.0/egg-dist-tmp-ISnChL
- zip_safe flag not set; analyzing archive contents...
- Adding car 1.0 to easy-install.pth file
- Installed /env/python2.6/lib/python2.6/site-packages/car-1.0-py2.6.egg
- Searching for money>=1.0
- Reading http://pypi.python.org/simple/money/
- Best match: money 1.0
- Downloading http://pypi.python.org/packages/source/m/money/money-1.0.zip#md5=b5eb9601f2680475d6d6710b20ac0fa3
- Processing money-1.0.zip
- Running money-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-JtOEyo/money-1.0/egg-dist-tmp-oYQNbf
- zip_safe flag not set; analyzing archive contents...
- Adding money 1.0 to easy-install.pth file
- Installed /env/python2.6/lib/python2.6/site-packages/money-1.0-py2.6.egg
- Searching for workhard>=1.0
- Reading http://pypi.python.org/simple/workhard/
- Best match: workhard 1.0
- Downloading http://pypi.python.org/packages/source/w/workhard/workhard-1.0.zip#md5=cf20df6009ebe505e5893a06450955e8
- Processing workhard-1.0.zip
- Running workhard-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-B1vmVq/workhard-1.0/egg-dist-tmp-GzPMeB
- zip_safe flag not set; analyzing archive contents...
- Adding workhard 1.0 to easy-install.pth file
- Installed /env/python2.6/lib/python2.6/site-packages/workhard-1.0-py2.6.egg
- Finished processing dependencies for girlfriend
原文鏈接:http://zoomq.qiniudn.com/ZQScrapBook/ZqFLOSS/data/20120101193303/