We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffcd9d4 commit 4f343c7Copy full SHA for 4f343c7
bootstrap/minimal/assets/_bootstrap.py
@@ -120,5 +120,8 @@ def load_module(self, fullname):
120
# Step 4: bootstrap the application !
121
#
122
123
+main_module = sys.argv[1]
124
+print 'Bootstrapping module: "%s"' % main_module
125
+
126
import runpy
-runpy._run_module_as_main("main", False)
127
+runpy._run_module_as_main(main_module, False)
bootstrap/minimal/jni/main.c
@@ -66,6 +66,15 @@ void android_main(struct android_app* state) {
66
return;
67
}
68
69
+ // pass a module name as argument: _bootstrap.py use it as the main module
70
+ int argc;
71
+ char * argv[2];
72
+ argc = 2;
73
+ argv[0] = "_bootstrap.py";
74
+ argv[1] = "main";
75
76
+ PySys_SetArgv(argc, argv);
77
78
// run the python bootstrap
79
LOGI("Run _bootstrap.py >>>");
80
FILE *fhd = fopen(bootstrap_fn, "rb");
0 commit comments