Re: using DictionaryServices module to get work with python2.6 #OSXspecific

2010-03-17 Thread Shashwat Anand
> Are you thinking of this? > http://pypi.python.org/pypi/pyobjc-framework-DictionaryServices/2.2 > I get the same IndexError while working with this wrapper. My guess is python2.6 does not support DictionaryServices on Snow Leopard . -- http://mail.python.org/mailman/listinfo/python-list

Re: using DictionaryServices module to get work with python2.6 #OSXspecific

2010-03-17 Thread Mark Lawrence
Shashwat Anand wrote: I wanted to use dictionary in my OSX terminal. So I wrote a function dict() in my ~/.bash_profile dict () { python2.5 -c 'import sys, DictionaryServices; word = " ".join(sys.argv[1:]); print DictionaryServices.DCSCopyTextDefinition(None, word, (0, len(word)))' $@ } her

using DictionaryServices module to get work with python2.6 #OSXspecific

2010-03-17 Thread Shashwat Anand
I wanted to use dictionary in my OSX terminal. So I wrote a function dict() in my ~/.bash_profile dict () { python2.5 -c 'import sys, DictionaryServices; word = " ".join(sys.argv[1:]); print DictionaryServices.DCSCopyTextDefinition(None, word, (0, len(word)))' $@ } here is the output: Shashw