Documents

SYS (SYSTEM)
sys.name

Returns Windows name.

Syntax

sys.name
sys.type

Returns system architecture.

Syntax

sys.type == 64
sys.type == 32
sys.is64

Returns if system architecture is x64.

Syntax

sys.is64
sys.dark

Check if dark mode is enabled.

Syntax

sys.dark
sys.var

Retrieves the value of an environment variable.

Syntax

sys.var('WINDIR')
sys.version (sys.ver)

Windows version.

Syntax

sys.version
sys.version.build
sys.version.major
sys.version.minor
sys.version.name
sys.version.type
sys.datetime (system.datetime)

Date and time format

Syntax

sys.datetime                                   // the date and time in a short format (Format: YYYY.MM.DD-HH.MM.SS).
sys.datetime.short                             // the date and time in a short format (Format: YYYY.MM.DD-HH.MM.SS).
sys.datetime.dayofweek (sys.datetime.dw)       // the day of the week as a number (Sunday as 1)

sys.datetime.date                              // the full date in a long format (Format: YYYY.MM.DD).
sys.datetime.yy                                // the year part of the current date as a two-digit number.
sys.datetime.year (sys.datetime.y)             // the year part of the current date as a four-digit number.
sys.datetime.month (sys.datetime.m)            // the month part of the current date.
sys.datetime.day (sys.datetime.d)              // the day part of the current date.

sys.datetime.time                              // the full time in hours, minutes, and seconds (Format: HH.MM.SS).
sys.datetime.pm                                // "AM" or "PM" based on the current time.
sys.datetime.hour (sys.datetime.h)             // the hour part of the current time (24-hour format).
sys.datetime.minute (sys.datetime.min)         // the minutes part of the current time.
sys.datetime.second (sys.datetime.s)           // the seconds part of the current time.
sys.datetime.milliseconds (sys.datetime.ms)    // the milliseconds part of the current time as a three-digit number.

sys.datetime("D")                              // the full date in a short format (Format: DD/MM/YYYY).
sys.datetime("Y")                              // the year part of the current date as a four-digit number.
sys.datetime("y")                              // the year part of the current date as a two-digit number.
sys.datetime("m")                              // the month part of the current date as a two-digit number.
sys.datetime("d")                              // the day part of the current date as a two-digit number.
sys.datetime("P") (sys.datetime("p"))          // "AM" or "PM" based on the current time.
sys.datetime("h")                              // the hour part of the current time as a two-digit number (12-hour format).
sys.datetime("H")                              // the hour part of the current time as a two-digit number (24-hour format).
sys.datetime("M")                              // the minute part of the current time as a two-digit number.
sys.datetime("S")                              // the second part of the current time as a two-digit number.
sys.datetime("s")                              // the milliseconds part of the current time as a three-digit number.

datetime("y/m/d")                              // the date in a short format (Format: YYYY/MM/DD).
datetime("h:M P")                              // the time in a short format (Format: HH:MM AM/PM).
datetime("H.M.S.s")                            // the time in a long format (Format: HH.MM.SS.MS).
Windows paths
sys                                            // %WINDIR%

sys.root                                       // %SYSTEMDRIVE%

sys.programdata                                // %PROGRAMDATA%
sys.prog                                       // %PROGRAMFILES%
sys.prog32                                     // %PROGRAMFILES(x86)%
sys.templates

sys.users
sys.appdata                                    // %APPDATA%
sys.temp                                       // %TEMP%

sys.directory (sys.dir)                        // %WINDIR%
sys.path                                       // %WINDIR%
sys.bin                                        // %WINDIR%\system32
sys.bin32
sys.bin64
sys.wow
sys.is_primary_monitor

Returns true if the current monitor is the primary

Syntax

sys.is_primary_monitor
sys.langid

Returns the language ID

Syntax

sys.langid
sys.extended

Returns whether the Shift key is currently pressed

Syntax

sys.extended
sys.is11

Returns whether the Windows version is 11

Syntax

sys.is11
sys.is10

Returns whether the Windows version is 10

Syntax

sys.is10
sys.is81

Returns whether the Windows version is 8.1

Syntax

sys.is81
sys.is8

Returns whether the Windows version is 8

Syntax

sys.is8
sys.is7

Returns whether the Windows version is 7

Syntax

sys.is7

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub