私のMonkeyRunnerスクリプトにシンプルに存在するモジュール、simplejsonをインポートするのが少し難しいです。欠けているモジュールをmonkeyrunnerスクリプトにインポートするにはどうしたらいいですか?
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
import simplejson
def main():
print "this is a test"
if __name__ == "__main__":
main()
はImportError:私はそれを理解したよう
のsimplejsonという名前のモジュール、MonkeyRunnerは、Python 2.5に基づいて、Jythonの2.5を使用しています?。私はJSONモジュールがPython 2.7で提供されていることを知っていますが、Python 2.5のsimplejsonを '/Library/Python/2.5/site-packages/simplejson-2.3.2-py2.5-macosx-10.7-x86_64.egg'の下にインストールしました。
私の質問は、monkeyRunnerスクリプトにインポートされたsimplejsonモジュールを正しく取得する方法です。