src/pylib/Lib/sys

Search:
Group by:
Source   Edit  

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

byteorder = "little"
Source   Edit  
float_repr_style = "short"
Source   Edit  
hexversion = 51577072
Source   Edit  
implementation = ("pynim", (0, 9, 8, "alpha", 0), 51577072, false)
Source   Edit  
maxsize = 9223372036854775807'i64
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 = "3.13.0"
Source   Edit  
version_info = (3, 13, 0, "final", 0)
Source   Edit  

Procs

func exit(x: NoneType) {....raises: [], tags: [], forbids: [].}
Source   Edit  
func exit[T](obj: T)
Warning: this does not raise SystemExit, which differs Python's
Source   Edit  
proc getdefaultencoding(): PyStr {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc getfilesystemencoding(): PyStr {....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.
Source   Edit