pip を使用して twill をインストールし、easy_install を使用してもう一度試してみました。Powershell で試してみたいと思います。このページに続いて - http://twill.idyll.org/私はそれで遊んでみたいと思いました。
twill の使用を開始するには、インストールしてから twill-sh と入力します。プロンプトで次のように入力します。
http://www.slashdot.org/ show showforms showhistoryにアクセス
twill-sh と入力しても機能しません。私はそれをパワーシェルで入力し、pythonをロードしてから試し、インポートツイルを使用して試してから試しました。エラーしか出ません。
Traceback (most recent call last):
File "C:\Python27\Scripts\twill-sh-script.py", line 9, in <module>
load_entry_point('twill==1.8.0', 'console_scripts', 'twill-sh')()
File "build\bdist.win32\egg\pkg_resources.py", line 356, in load_entry_point
File "build\bdist.win32\egg\pkg_resources.py", line 2439, in load_entry_point
File "build\bdist.win32\egg\pkg_resources.py", line 2155, in load
File "C:\Python27\lib\site-packages\twill\__init__.py", line 52, in <module>
from shell import TwillCommandLoop
File "C:\Python27\lib\site-packages\twill\shell.py", line 9, in <module>
from twill import commands, parse, __version__
File "C:\Python27\lib\site-packages\twill\commands.py", line 7, in <module>
from lxml import html
モジュールをロードして、スクリプトを書かずにモジュールを操作するにはどうすればよいですか?