This is a Python program that pulls definitions from a list and outputs them to a text file.
There are two versions, one with a GUI, and one with a CLI (command line interface). Choose
whichever seems most appropriate for you.
To read words from a text file, the following configuration should be used:
word1,word2,word3
Otherwise, the program will not be able to parse your file and most likely crash.
从文本文件中读取单词,再从wordnik.com网站获取单词释义。
###Usage:
easy_install wordnik
- 命令行版本
python definitions-finder-cli.py
单词表放在text.txt。 - 图形界面版本需要安装wxpython
1
2
3brew install wxpython
mkdir -p ~/Library/Python/2.7/lib/python/site-packages
echo "import site; site.addsitedir('$(brew --prefix)/lib/python2.7/site-packages')" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
另一种方法:1
2
3import wxversion
wxversion.select('3.0')
import wx
python definition-finder.py
菜单栏open导入单词表,自动查词。
###参考: