On Thu, 2009-12-10 at 00:19 -0800, Ryan McGrath wrote:
> Alright, I committed some work that should hopefully take care of your
> Proxy woes.
>
http://github.com/ryanmcgrath/twython/commit/f82702e70643621c0a82ed74e94a912e2b04115c
> Basically, pass an object like the following to the setup method. I've
> not been able to test this thoroughly yet, so any tests you can do
> would be appreciated. Feel free to file bugs on the Github project.
> -------------------------------------------------------------------------------
> import twython
> proxyobj = {
> "username": "fjnfsjdnfjd",
> "password": "fjnfjsjdfnjd",
> "host": "
http://fjanfjasnfjjfnajsdfasd.com",
> "port": 87
> }
> lol = twython.setup("username", "password", proxy = proxyobj)
> -------------------------------------------------------------------------------
This looks good, but I think there might be a problem with the egg.
git clone git://
github.com/ryanmcgrath/twython.git
cd twython
python setup.py build
sudo python setup.py install
Run "python" from a different directory....
awilliam@linux-m3mt:~> python
Python 2.6.2 (r262:71600, Oct 24 2009, 03:16:31)
[GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import twython
>>> x = twython.setup()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'setup'
>>> dir(twython)
['__builtins__', '__doc__', '__file__', '__loader__', '__name__',
'__package__', '__path__']
>>>
If I do it from the twython source directory it works:
awilliam@linux-m3mt:~/Desktop/Downloads/Python/twython> python
Python 2.6.2 (r262:71600, Oct 24 2009, 03:16:31)
[GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import twython
>>> x = twython.setup()
>>>
It seems like something isn't being packaged properly in the egg; which
I see installed in
awilliam@linux-m3mt:/usr/local/lib/python2.6/site-packages> ls
-l /usr/local/lib/python2.6/site-packages/twython-0.9-py2.6.egg
-rw-r--r-- 1 root root 63723 2009-12-15
06:18 /usr/local/lib/python2.6/site-packages/twython-0.9-py2.6.egg
and was installed there by setup.py
...
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing twython-0.9-py2.6.egg
Copying twython-0.9-py2.6.egg to /usr/local/lib/python2.6/site-packages
Adding twython 0.9 to easy-install.pth file
....