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
stderr = newNoEncTextIO(stderr, "<stderr>", DefNewLine)
- Source Edit
stdin = newNoEncTextIO(stdin, "<stdin>", DefNewLine)
- Source Edit
stdout = newNoEncTextIO(stdout, "<stdout>", DefNewLine)
- Source Edit
Lets
dunder_stderr = stderr
- __stderr__ Source Edit
dunder_stdin = stdin
- __stdin__ Source Edit
dunder_stdout = stdout
- __stdout__ Source Edit
Consts
float_info = (max: 1.7976931348623157e+308, max_exp: 1024, max_10_exp: 308, min: 2.2250738585072014e-308, min_exp: -1021, min_10_exp: -307, dig: 15, mant_dig: 53, epsilon: 2.220446049250313e-16, radix: 2)
- float_info.rounds is defined as a getter, see rounds Source Edit
hexversion = 201472
- Source Edit
implementation = ("pynim", (0, 9, 3, "alpha", 0), 2307, false)
- Source Edit
platform: PyStr = "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 = (major: 3, minor: 13, patch: 0, releaselevel: "final", serial: 0)
- Source Edit
Procs
proc getdefaultencoding(): PyStr {....raises: [], tags: [], forbids: [].}
-
Return the current default encoding used by the Unicode implementation.
Always "utf-8" in Nim
Source Edit proc getfilesystemencoding(): PyStr {....raises: [], tags: [], forbids: [].}
- Source Edit
Converters
converter noneStdstream(n: NoneType): typeof(stdout) {....raises: [], tags: [], forbids: [].}
- Source Edit
Templates
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
-
[]=, repr, sorted, <, <=, nimArrayAsList, []=, list, ==, pop, count, repr, <=, sorted, PyList, sort, sorted, $, [], newPyListOfCap, index, reverse, index, clear, [], checkLenientOps, +=, getPtr, newPyList, <, pop, []=, sort, append, list, pairs, extend, []=, setLen, list, []=, <, items, count, <=, extend, ==, newPyList, *=, []=, newPyList, []=, len, mitems, *, +, insert, ==, @, +, +=, 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, [], [], read, read, read, read, read, read, readline, readline, readline, readline, readline, readline, write, write, write, fileno, isatty, flush