py/modsys: Add support for sys.executable.
Only intended to be used on Unix and other "OS" ports. Matches CPython. This should give the absolute path to the executing binary. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
committed by
Damien George
parent
c44b3927b8
commit
0e8dfaf538
@@ -1372,6 +1372,13 @@ typedef double mp_float_t;
|
||||
#define MICROPY_PY_SYS_EXC_INFO (0)
|
||||
#endif
|
||||
|
||||
// Whether to provide "sys.executable", which is the absolute path to the
|
||||
// micropython binary
|
||||
// Intended for use on the "OS" ports (e.g. Unix)
|
||||
#ifndef MICROPY_PY_SYS_EXECUTABLE
|
||||
#define MICROPY_PY_SYS_EXECUTABLE (0)
|
||||
#endif
|
||||
|
||||
// Whether to provide "sys.exit" function
|
||||
#ifndef MICROPY_PY_SYS_EXIT
|
||||
#define MICROPY_PY_SYS_EXIT (1)
|
||||
|
||||
Reference in New Issue
Block a user