Android的monkeyrunner的help.py在哪里

发布于 2024-10-06 18:36:12 字数 570 浏览 2 评论 0原文

我只是找不到 help.py 文件来为 monkeyrunner 创建 API 参考。 中描述的命令

Android 参考 monkeyrunner < ;格式>当我调用 monkeyrunner html help.py /path/to/place/the/doc.html 时,help.py 不起作用。

很明显,找不到 help.py 文件,monkeyrunner 还告诉我“无法打开指定的脚本文件”。但是我的系统上的 locate 并没有给我带来与 Monkeyrunner 或 Android 相关的 help.py 文件。

所以我的问题是:他们将用于创建 API 参考的 help.py 文件隐藏在哪里?

I just can't find the help.py file in order to create the API reference for the monkeyrunner. The command described at the Android references

monkeyrunner <format> help.py <outfile> does not work when i call monkeyrunner html help.py /path/to/place/the/doc.html.

It's quite obvious that the help.py file is not found and the monkeyrunner also tells me "Can't open specified script file". But a locate on my system doesn't bring me a help.py file that has anything to do with monkeyrunner or Android.

So my question is: Where did they hide the help.py file for creating the API reference?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

为人所爱 2024-10-13 18:36:12

我也找不到。但我们可以假设它只是使用传入的参数调用 MonkeyRunner.help() 。如果您只是想快速获得一些东西,请使用我创建的也名为 help.py 的脚本:

#!/usr/bin/env python

# Imports the monkeyrunner modules used by this program
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice

text = MonkeyRunner.help("html");

f = open('help.html', 'w')
f.write(text);
f.close();

像任何其他 Monkeyrunner 脚本一样运行它:

$ monkeyrunner help.py

I cannot find it either. But one can assume that it is simply calling MonkeyRunner.help() with the passed in arguments. If you just want to get something quick use this script I created also named help.py:

#!/usr/bin/env python

# Imports the monkeyrunner modules used by this program
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice

text = MonkeyRunner.help("html");

f = open('help.html', 'w')
f.write(text);
f.close();

Run it just like any other monkeyrunner script:

$ monkeyrunner help.py
慵挽 2024-10-13 18:36:12

当我的机器上有所有代码(即 repo 同步)后,它与其他三个一起位于 mydroid/sdk/monkeyrunner/scripts 中:

help.pymonkey_playback.pymonkey_recorder.pymr_pydoc.py

After I have all codes in my machine (i.e, repo sync), it is at mydroid/sdk/monkeyrunner/scripts along with other three:

help.py monkey_playback.py monkey_recorder.py mr_pydoc.py

数理化全能战士 2024-10-13 18:36:12

这是一个出色的答案 https://stackoverflow.com/a/4470513/551383 但如果你真的想要这个文件在android源即http://androidxref.com/4.2_r1/xref /sdk/monkeyrunner/scripts/help.py

This is brilliant answer https://stackoverflow.com/a/4470513/551383 but if you really want this file is in android source i.e. http://androidxref.com/4.2_r1/xref/sdk/monkeyrunner/scripts/help.py

野の 2024-10-13 18:36:12

http://androidxref.com/source/xref/sdk/monkeyrunner/ scripts/help.py

我相信网站上的文档是从该脚本开始的,但我很确定之后也会有人对其进行编辑。

http://androidxref.com/source/xref/sdk/monkeyrunner/scripts/help.py

I believe the documentation on the website starts from that script, but I'm pretty sure somebody edits it a bit afterwards as well.

呆萌少年 2024-10-13 18:36:12

Monkeyrunner 的帮助文档中有错误(monkeyrunner 内置帮助),您应该以另一种顺序使用参数:

monkeyrunner help.py;

如果您在 monkeyrunner.bat 目录 (android Monkeyrunner 脚本)。
如果您没有上面用户描述的 Repo Sync,您可以找到源代码(包括 help.py),例如,在这里:monkeyrunner 脚本

我在 Google Code 上提出了一个问题(问题 26259:monkeyrunner 内置帮助描述错误),我希望他们能尽快修复它。

There's an error in monkeyrunner's help documentation (monkeyrunner Built-in Help), you should use parameters in another order:

monkeyrunner help.py <format> <outfile>

And don't forget about specifying a full path to the script, if you're running it outside of the monkeyrunner.bat directory (android monkeyrunner scripts).
If you don't have Repo Sync, described by users above, you can find the sources (including help.py), for example, here: monkeyrunner scripts.

I opened an issue at Google Code (Issue 26259: monkeyrunner Built-in Help Description Error) and I hope that they'll fix it soon.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文