我使用 pip 安装了 twill,另一个尝试使用 easy_install,我想在 Powershell 中使用它。按照这个页面 - http://twill.idyll.org/我想玩它。
要开始使用 twill,请安装它,然后键入 twill-sh。在提示符下输入:
去http://www.slashdot.org/ 显示 showforms showhistory
当我输入 twill-sh 时它不起作用。我在power shell中输入过,在加载python后尝试过,在使用import twill并尝试后尝试过。我只会得到错误。
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
我如何只加载模块,这样我就可以在不编写脚本的情况下使用它们?