The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.
your example code in the readme file works great in the interactive but fails when I put it in a file
this is the code -->
>>> from xgoogle.search import GoogleSearch
>>> gs = GoogleSearch("catonmat")
>>> gs.results_per_page = 25
>>> results = gs.get_results()
>>> for res in results:
... print res.title.encode('utf8')
$ ./xgoogle_mod.py
from: can't read /var/mail/xgoogle.search
./xgoogle_mod.py: line 4: syntax error near unexpected token `('
./xgoogle_mod.py: line 4: `gs = GoogleSearch("quick and dirty")'
Whyever is it looking for /var/mail/xgoogle, when I have it loaded in dist-pkgs where the interactive imports it just fine. What am I missing?
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
Education Sponsors
I am being sponsored by A-Writer! If you ever need help with essay writing, look no further than A-Writer! They will help you with your writing in as quickly as 3 hours!
I am getting a weird error
your example code in the readme file works great in the interactive but fails when I put it in a file
this is the code -->
>>> from xgoogle.search import GoogleSearch
>>> gs = GoogleSearch("catonmat")
>>> gs.results_per_page = 25
>>> results = gs.get_results()
>>> for res in results:
... print res.title.encode('utf8')
$ ./xgoogle_mod.py
from: can't read /var/mail/xgoogle.search
./xgoogle_mod.py: line 4: syntax error near unexpected token `('
./xgoogle_mod.py: line 4: `gs = GoogleSearch("quick and dirty")'
Whyever is it looking for /var/mail/xgoogle, when I have it loaded in dist-pkgs where the interactive imports it just fine. What am I missing?
Reply To This Comment