Sys
Overview
Sys is a class in Aspose.Font FOSS for Python.
Sys.sleep(seconds) pauses execution for the specified number of seconds; the argument may be a float for sub‑second precision.
This class provides 21 methods for working with Sys objects in Python programs.
Available methods include: args, command, cpuTime, environment, executablePath, exit, getChar, getCwd, getEnv, print, println, programPath, and 9 additional methods.
All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package.
Methods
| Signature | Description |
|---|---|
time() | Returns the current system time in seconds since the epoch |
exit(code) | Terminates the program using the supplied exit code |
print(v) | writes a value to standard output without a trailing newline, whileSys.println(v)` appends a newline |
println(v) | Writes the given value to standard output followed by a newline |
args() | Returns a list of command‑line arguments passed to the script |
getEnv(s) | Calls getEnv on this Sys instance. |
putEnv(s, v) | Sets the environment variable s to the value v |
environment() | Returns a dictionary containing all current environment variables |
sleep(seconds) | Pauses execution for the specified number of seconds; the argument may be a float for sub‑second precision |
setTimeLocale(loc) | Sets the locale used for time‑related formatting functions |
getCwd() | Returns the current working directory as a string path |
setCwd(s) | Changes the current working directory to the path s |
systemName() | Returns the name of the operating system platform |
command(cmd, args) | Executes the external command cmd with argument list args and returns its result |
cpuTime() | Returns the amount of CPU time consumed by the current process |
executablePath() | Calls executablePath on this Sys instance. |
programPath() | Returns the file system path of the currently running script |
getChar(echo) | Reads a single character from stdin; if echo is true, the character is echoed to stdout |
stdin() | Returns the file‑like object representing standard input |
stdout() | Returns the file‑like object representing standard output |
stderr() | Returns the file‑like object representing standard error |