Can I use python to define a word like this:
x=raw_input(\"Enter Word: \")
x=define(x)
print x
Is this possible? If si.. how 2 do it?
T
You can probobally do this using the re and urllib2 modules.. Try this code out dawg.
import re
import urllib2
def find(x):
srch=str(x)
x=urllib2.urlopen("http://dictionary.reference.com/browse/"+srch+"?s=t")
x=x.read()
items=re.findall('','')
m=re.findall('at Dictionary.com, a free online dictionary with pronunciation, synonyms and translation. Look it up now! "/>',z)
if m==[]:
if z.startswith("Get your reference question answered by Ask.com"):
print "Word not found! :("
else:
print z
else:
print "Word not found! :("
x=raw_input("Enter word to find: ")
find(x)
Let me know how it goes!