很抱歉我已经在“超级用户”上问过这个问题,但没有人回答,所以我从“超级用户”中删除了它并决定将其发布在这里。希望这不是一个大犯罪,特别是考虑到我首先被建议在“StackOverflow”(而不是“SuperUser”)上使用斜纹布,
我如何开始使用斜纹布?我刚刚下载它,解压它并单击文件夹中的 setup .py 文件。黑色的窗口(终端)出现了一会儿就消失了。
(我的计算机上确实安装了 Python 2.5 - 以及来自 Google App Engine 的 SDK)
在斜纹布中 文档部分 它说:
下载斜纹布
最新发布的斜纹布是斜纹布
0.9,2007 年 12 月 27 日星期四发布;它可以在以下位置下载:
http://darcs.idyll.org/~t/projects/ twill-0.9.tar.gz。
您还可以使用Python的easy_install
安装或升级斜纹布。
斜纹适用于 Python 2.3 或更高版本。
要开始使用 twill,请安装它并
然后输入 twill-sh。根据提示
类型:
前往http://www.slashdot.org/
显示
显示表单
显示历史
从这段文字中我不清楚我应该输入什么(只有“twill-sh”或“twill-sh”以及该行下的所有单词)以及在哪里(我尝试在我计算机的命令提示符窗口 - 无济于事)
任何人都可以帮助我吗?
先感谢您。
更新1:(
此更新是对S.Mark给出的答案的回应)
您好,S.Mark!!!!
我已尝试遵循您的指示。事情是这样的:
首先,我在 D 盘上创建了一个文件夹,并将其命名为“tmp”。然后我下载了 twill-0.9 并将其解压到该文件夹中。因此,现在我计算机上该文件的路径与您的示例中的路径相同: D:\tmp\twill-0.9 :
(来源:narod.ru)
(来源:narod.ru)
然后,我尝试了在我的计算机上打开命令提示符:
(来源:narod.ru)
(来源:narod.ru)
(来源:narod.ru)
(来源:narod.ru)
(来源:narod.ru)
然后,执行以下步骤2 你的指示,我尝试切换到D盘:
(来源:narod.ru)
但由于某种原因它不起作用:
(来源:narod.ru)
这句中文说诸如“此操作已被拒绝”之类的内容。为什么会这样呢?
好吧,无论如何,我尝试继续执行步骤 3,这就是我得到的:
(来源:narod.ru)
据我所知可以理解,这句中文的意思是“‘C:\’既不是内部命令,也不是外部命令,因此无法执行。 ”
为什么会这样呢?我的电脑有问题吗?
更新2:(
此更新是我对S.Mark给出的答案的第二次回复)
你好,S.Mark!再次感谢您的回答。
是的,这次当我刚刚输入您在帖子中突出显示的那些部分时,它就起作用了。所以,当我一开始只输入“d:”时,它就起作用了!
但是,当我输入“python setup.py build”时,我收到了相同的错误消息(“'python'既不是内部命令也不是外部命令;它无法执行。”):
(来源:narod.ru)
我试图重复这个命令不小心漏掉了“python”这个词:
(来源:narod.ru)
当我按下“ Enter”键,构建过程似乎启动了 - 至少我看到的与您的说明中的步骤 4(“启动构建过程”)非常相似:
(来源:narod.ru)
(来源:narod.ru)
(来源:narod.ru)
但现在我是对于是否继续执行步骤 5(“安装”)有点犹豫,因为我不确定我所做的是否正确。
如果我在步骤 4 中所做的没问题,我是否也应该在步骤 5 中省略“python”一词?
附带问题:您是如何在不进行屏幕截图的情况下将终端的内容放入您的帖子中的?是否有某种方法可以将终端的内容放入剪贴板?一直制作屏幕截图并在发布之前托管它们是相当麻烦的。
更新3:(
这是我对S.Mark的第三次回复)
S.Mark,你好!
(希望你还没有厌倦我)
“…是的,你可以省略 python 并直接运行 setup.py,因为你的 python 安装在注册表中注册了 *.py…关于步骤 5,你可以只运行 setup.py install” – 我按照您的这些话进行操作,安装过程成功运行!谢谢。
但对于以下步骤(“然后从开始菜单打开 python 提示符,并测试步骤 6 和 8”),Python 提示符并没有取得太大成功:
(来源:narod.ru)
都没有成功在通常的命令提示符(终端)中:
(来源:narod.ru)
(它再次说在中文中,python“既不是内部命令,也不是外部命令,因此无法执行”)。您知道为什么它不起作用吗?
“……你的Python安装在哪里? C:\Python25?”
- 是的,没错。
“……有一个设置(命令提示符属性 - 轻松编辑模式)可以在命令提示符上选择文本,您可以在 superuser.com 中询问吗?”
- 当然,我会在那里问这个问题。谢谢你告诉我。
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, especially given the fact that I was firstly advised to use twill here on "StackOverflow" (not on "SuperUser")
How do I start using twill? I have just downloaded it, unpacked it and clicked on the setup .py file in the folder. The black window (terminal) appeared for a moment and vanished.
(I do have Python 2.5 installed on my computer - along with SDK from Google App Engine)
In the twill documentation section it says:
Downloading twill
The latest release of twill is twill
0.9, released Thursday, December 27th, 2007; it is available for download at
http://darcs.idyll.org/~t/projects/twill-0.9.tar.gz.
You can also use Python's easy_install
to install or upgrade twill.
twill works with Python 2.3 or later.
To start using twill, install it and
then type twill-sh. At the prompt
type:
go http://www.slashdot.org/
show
showforms
showhistory
I am not clear from this passage what I am supposed to type (only "twill-sh" or "twill-sh" and all the words under that line) and where (I tried typing it in the command prompt window of my computer - to no avail)
Can, anyone, please, help me out here?
Thank You in advance.
Update 1:
(This update is a response to the answer given by S.Mark)
Hello, S.Mark!!!!
I’ve tried to follow Your instructions. Here is what happened:
Firstly, I created a folder on my D disk and named it “tmp”. Then I downloaded and extracted twill-0.9 into that folder. So, now the path to this file on my computer was just as same as the one in Your example: D:\tmp\twill-0.9 :
(source: narod.ru)
(source: narod.ru)
Then, I tried to open the command prompt on my computer:
(source: narod.ru)
(source: narod.ru)
(source: narod.ru)
(source: narod.ru)
(source: narod.ru)
Then, following step 2 of Your instructions, I tried to switch to D disk:
(source: narod.ru)
But for some reason it didn’t work:
(source: narod.ru)
This Chinese line says something like “This action has been rejected.” Why is it so?
Well, I tried to proceed to step 3 anyway, and here is what I’ve got:
(source: narod.ru)
As far as I can understand, this Chinese line says something like “ ’C:\’ is neither internal nor external command, thus, it cannot be carried out. ”
Why is it so? Is there something wrong with my computer?
Update 2:
(This update is my second response to the answer given by S.Mark)
Hello, S.Mark!!! Thank You for Your answer again.
Yes, this time it worked when I just typed those parts that You highlighted in Your post. So, when I typed just “d:” in the very beginning, it worked!!!
But then, when I typed “python setup.py build”, I got the same error message (“ ’python’is neither an internal or external command; it can’t be carried out. “) :
(source: narod.ru)
I tried to repeat this command and accidentally omitted the word “python”:
(source: narod.ru)
When I pressed “Enter” key, the build process seemed to launch - at least what I saw then resembled the step 4 of Your instructions (“start the build process”) very much:
(source: narod.ru)
(source: narod.ru)
(source: narod.ru)
But now I am a little bit hesitant about proceeding to step 5 (“Install It”) as I am not sure if what I have done is the right thing.
If what I did in step 4 was okay, should I also omit the word “python” in step 5?
A side question: How did You manage to put the contents of the terminal into Your post without making screenshots? Is it like there is some way of putting the terminal’s contents into the clipboard? Making screenshots all the time and hosting them prior to posting is quite cumbersome.
Update 3:
(This update is my third response to S.Mark)
S.Mark, hello again!!!
(Hope you are not sick and tired of me yet)
“…and yeah you could omit python and directly run setup.py because your python installation registered *.py in registry… regarding step 5, you could just run setup.py install” – I followed these words of Yours and install process ran successfully! Thank You.
But as for the following steps (“then open python prompt from start menu, and test step 6 and 8”), there wasn’t much success in the Python prompt:
(source: narod.ru)
Neither was it successful in the usual command prompt (terminal):
(source: narod.ru)
(It again says in Chinese that python “is neither an internal nor external command and, therefore, can’t be carried out”). Do You have any idea why it didn’t work?
“…where is your python installation? C:\Python25?”
- Yes, that’s right.
“…there is a setting (command prompt properties - easy edit mode) to enable selection of text on the command prompt, could you ask that in superuser.com?”
- Sure, I will ask this question there. Thanks for telling me.
发布评论
评论(1)
您不能只双击 setup.py
您需要打开命令提示符或 shell 并转到该文件夹
,并且需要执行
安装步骤应该自动正常构建,因此只有最后一个可以工作
编辑:好的,这是超级用户方式的安装步骤
我已将 twill-0.9.tar.gz 提取到 D:\tmp\twill-0.9
我在驱动器 C 上,所以我切换到 D:
现在,使用 cd 命令更改文件夹
开始构建过程
安装它
测试导入是否
导入很好,但是在 python 2.6 上有 DeprecationWarnings,但这应该没问题,并且对于 python 2.5 应该根本没有警告
确认其是否正确导入,您将在那里看到 twill 及其函数,所以是的。< /p>
<前>>>>> 目录()
['__builtins__', '__doc__', '__name__', '__package__', '斜纹']
>>>>> 从 twill.commands 导入 *
>>>>> 目录()
['__builtins__'、'__doc__'、'__name__'、'__package__'、'add_auth'、'add_extra_header'、'代理'、'返回'、'clear_cookies'、'clear_extra_headers'、'代码'、'配置'、'调试'、'回显'、'退出'、'extend_with'、'fa'、'查找'、'跟随
>>
You cannot just double click setup.py
You need to open command prompt or shell and go to that folder
and need to do
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:
Now, change the folder by using cd command
start the build process
Install it
Test for import is or not
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.