Lib/sys
Hint:
if not defined pylibConfigIsolated, this module will call setlocale(LC_CTYPE, ""), a.k.a. changing locale to user's configure, just as CPython's initialization.
Vars
orig_argv = newPyListOfCap(argc)
- .. hint:: rely on paramCount<https://nim-lang.org/docs/cmdline.html#paramCount>_ and paramStr<https://nim-lang.org/docs/cmdline.html#paramStr%2Cint>_. See their document for availability. Source Edit
Consts
float_repr_style = "short"
- Source Edit
hexversion = 51577072
- Source Edit
implementation = ("pynim", (0, 9, 11, "alpha", 0), 51577072, false)
- Source Edit
platform = "linux"
-
Note: the value is standalone for bare system
and haiku/netbsd appended with major version instead of "unknown". In short, this won't be "unknown" as Python does.
Source Edit version_info = (3, 13, 0, "final", 0)
- Source Edit
Procs
proc getdefaultencoding(): PyStr {....raises: [], tags: [], forbids: [].}
- Source Edit
proc getfilesystemencoding(): PyStr {....raises: [], tags: [], forbids: [].}
- Source Edit
Templates
template addaudithook(hook: HookProc)
-
Admonition: since Python 3.8Source Edit
template executable(): PyStr
-
returns:
- when nimscript, path of Nim;
- when JavaScript:
- on browser: empty string
- on NodeJS/Deno: executable path of Node/Deno
- otherwise, it's the path of current app/exe.
Exports
-
write, readline, fileno, implementation, readline, maxsize, hexversion, isatty, version_info, orig_argv, flush, dunder_stdout, byteorder, read, executable, readline, float_info, getsizeof, stdin, write, read, stdout, dunder_stderr, rounds, exit, PySys_AddAuditHook, version, getdefaultencoding, read, read, readline, getfilesystemencoding, exit, write, readline, flags, copyright, PySys_Audit, read, readline, getsizeof, argv, stderr, dunder_stdin, read, []=, newPyList, newPyList, sorted, <, <=, nimArrayAsList, []=, list, ==, pop, count, repr, []=, newPyList, <=, sorted, PyList, sort, sorted, clear, $, [], newPyListOfCap, index, append, index, newPyListOfStr, [], checkLenientOps, +=, getPtr, newPyList, <, pop, []=, sort, +=, list, pairs, delitem, delitem, extend, []=, setLen, list, []=, <, items, count, <=, newPyListOfStr, extend, ==, newPyList, *=, []=, newPyList, []=, len, mitems, *, +, insert, ==, @, +, reverse, list, delitem, reverse, repr, *, [], list, [], runeLenAt, not, str, str, toPyStr, contains, substr, byteLen, str, items, StringLike, ==, str, toNimString, +, ==, str, chars, contains, and, getChar, $, len, +=, str, +=, len, toPyStr, PyStr, runes, [], ==, runeAtPos, or, contains, +, toNimStr, fspath, +=, toPyStr, [], []