How Can I Start Using Twill?
I am sorry I have already asked this question on 'Superuser', but nobody answers there, so I deleted it from 'Superuser' and decided to post it here. Hope it's not a big crime, esp
Solution 1:
You cannot just double click setup.py
You need to open command prompt or shell and go to that folder
and need to do
python setup.py build
python setup.py install
install step should automatically do build normally, so only last one will work
Edit: ok, here is superuser way of installation steps
I have extracted twill-0.9.tar.gz to D:\tmp\twill-0.9
I am on drive C, so I switched to D:
C:\>d:
Now, change the folder by using cd command
C:\>cd D:\tmp\twill-0.9
start the build process
D:\tmp\twill-0.9>python setup.py build (WARNING: importing distutils, not setuptools!) D:\data\program\Python26\lib\distutils\dist.py:266: UserWarning: Unknown distribution option: 'entry_points' warnings.warn(msg) D:\data\program\Python26\lib\distutils\dist.py:266: UserWarning: Unknown distribution option: 'test_suite' warnings.warn(msg) running build running build_py creating build creating build\lib creating build\lib\twill ...... running build_scripts creating build\scripts-2.6 copying and adjusting twill-fork -> build\scripts-2.6
Install it
D:\tmp\twill-0.9>python setup.py install (WARNING: importing distutils, not setuptools!) running install running build running build_py ...... running install_scripts copying build\scripts-2.6\twill-fork -> D:\data\program\Python26\Scripts running install_egg_info Writing D:\data\program\Python26\Lib\site-packages\twill-0.9-py2.6.egg-info
Test for import is or not
D:\tmp\twill-0.9>python Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import twill import re, base64, urlparse, posixpath, md5, sha, sys, copy twill\other_packages\_mechanize_dist\_auth.py:14: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import re, base64, urlparse, posixpath, md5, sha, sys, copy >>>
Import was fine, but there is DeprecationWarnings on python 2.6, but this should be ok and should be no warnings at all with python 2.5
confirm its properly imported or not, you will see twill and its functions there, so yes.
>>> dir() ['__builtins__', '__doc__', '__name__', '__package__', 'twill'] >>> from twill.commands import * >>> dir() ['__builtins__', '__doc__', '__name__', '__package__', 'add_auth', 'add_extra_header', 'agent', 'back', 'clear_cookies', 'clear_extra_headers', 'code', 'config', 'debug', 'echo', 'exit', 'extend_with', 'fa', 'find', 'follow >>>
Post a Comment for "How Can I Start Using Twill?"