(android_log_write, stdout_prio, stderr_prio)
| 24 | # redirect them to the system log using a pipe, but that wouldn't be convenient |
| 25 | # or appropriate for all apps. So we redirect at the Python level instead. |
| 26 | def init_streams(android_log_write, stdout_prio, stderr_prio): |
| 27 | if sys.executable: |
| 28 | return # Not embedded in an app. |
| 29 | |
| 30 | global logcat |
| 31 | logcat = Logcat(android_log_write) |
| 32 | sys.stdout = TextLogStream(stdout_prio, "python.stdout", sys.stdout) |
| 33 | sys.stderr = TextLogStream(stderr_prio, "python.stderr", sys.stderr) |
| 34 | |
| 35 | |
| 36 | class TextLogStream(io.TextIOWrapper): |
nothing calls this directly
no test coverage detected
searching dependent graphs…