Where is the help.py for Android's monkeyrunner
Asked Answered
M

5

9

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?

Mournful answered 9/12, 2010 at 8:58 Comment(0)
M
14

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
Mathre answered 17/12, 2010 at 12:37 Comment(1)
doesn't work for me. throwing exception when executing the fourth line (when executing help method).Blume
B
1

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.

Bannerol answered 8/3, 2011 at 0:7 Comment(0)
F
1

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

Fishplate answered 10/7, 2011 at 3:53 Comment(0)
T
1

This is brilliant answer https://mcmap.net/q/1148266/-where-is-the-help-py-for-android-39-s-monkeyrunner 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

Tightrope answered 14/12, 2012 at 21:51 Comment(0)
F
0

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.

Fossette answered 1/3, 2012 at 15:15 Comment(1)
yeah monkeyrunner is still brain dead ... Wouldnt work till i ran it from its installation pathEzraezri

© 2022 - 2024 — McMap. All rights reserved.