File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -120,5 +120,8 @@ def load_module(self, fullname):
120
120
# Step 4: bootstrap the application !
121
121
#
122
122
123
+ main_module = sys .argv [1 ]
124
+ print 'Bootstrapping module: "%s"' % main_module
125
+
123
126
import runpy
124
- runpy ._run_module_as_main ("main" , False )
127
+ runpy ._run_module_as_main (main_module , False )
Original file line number Diff line number Diff line change @@ -66,6 +66,15 @@ void android_main(struct android_app* state) {
66
66
return ;
67
67
}
68
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
+
69
78
// run the python bootstrap
70
79
LOGI ("Run _bootstrap.py >>>" );
71
80
FILE * fhd = fopen (bootstrap_fn , "rb" );
You can’t perform that action at this time.
0 commit comments