Created
September 7, 2010 21:47
-
-
Save hiddendragonXVII/569187 to your computer and use it in GitHub Desktop.
quick python script to define words
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from suds import WebFault | |
from suds.client import Client | |
import sys | |
class definition(object): | |
def __init__(self, input): | |
url = 'http://services.aonaware.com/DictService/DictService.asmx?wsdl' | |
client = Client(url) | |
d = dict(word=input) | |
self.result = client.service.Define(**d) | |
self.word=input | |
print self.result[1] | |
try: | |
input = sys.argv[1] | |
except IndexError: | |
print "Usage:\ndefine lorem epsom" | |
exit() | |
test= definition(sys.argv[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment