Xavier de Gaye added the comment: Following Serhiy suggestion at msg224477, this tentative patch adds the is_android attribute to the posix module and the default_shell attribute to the os module. No documentation for the moment. No test case is needed I think, as the changes in issue 16255 will test any solution found here.
An alternative to posix.is_android is sys.platform set to 'linux-android' on Android. These are the locations in the standard library that do not test for "if sys.platform.startswith('linux')": Lib/distutils/tests/test_dist.py|386 col 16| if sys.platform in ('linux', 'darwin'): Lib/test/test_logging.py|527 col 12| if sys.platform in ('linux', 'darwin'): Lib/test/test_resource.py|135 col 26| @unittest.skipUnless(sys.platform == 'linux', 'test requires Linux') Lib/test/test_socket.py|898 col 16| or sys.platform in ('linux', 'darwin')): Lib/test/test_socket.py|2256 col 23| @skipWithClientIf(sys.platform not in {"linux"}, Lib/test/test_socket.py|4508 col 22| @unittest.skipUnless(sys.platform == 'linux', 'Linux specific test') Lib/test/test_sysconfig.py|388 col 26| @unittest.skipUnless(sys.platform == 'linux', 'Linux-specific test') ---------- nosy: +xdegaye Added file: http://bugs.python.org/file42953/default_shell.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16353> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com