VEX IQ Python API
Functions | Variables
sys Namespace Reference

PyMite's system module, sys. More...

Functions

def exit (val)
 Terminate the program, returning an error code. More...
 
def gc ()
 Runs the Garbage Collector. More...
 
def getb ()
 Gets a byte from the platform's default I/O Returns the byte in the LSB of the returned integer. More...
 
def heap ()
 Returns a tuple containing the (total, free) heap size. More...
 
def putb (b)
 Sends the LSB of the integer out the platform's default I/O. More...
 
def run_in_thread (f)
 Runs the given function in a thread sharing the current global namespace. More...
 
def thread_id ()
 Returns the id of the current thread. More...
 
def clock ()
 Get the number of seconds since system startup. More...
 
def sleep (seconds)
 
def wait_for (func, value=True, timeout=None, check_period=0)
 

Variables

int maxint = 0x7FFFFFFF
 

Detailed Description

PyMite's system module, sys.

USAGE

import sys

Function Documentation

◆ exit()

def sys.exit (   val)

Terminate the program, returning an error code.

◆ gc()

def sys.gc ( )

Runs the Garbage Collector.

◆ getb()

def sys.getb ( )

Gets a byte from the platform's default I/O Returns the byte in the LSB of the returned integer.

◆ heap()

def sys.heap ( )

Returns a tuple containing the (total, free) heap size.

If flash heap is enabled, adds the (total, free) flash heap size.

◆ putb()

def sys.putb (   b)

Sends the LSB of the integer out the platform's default I/O.

◆ run_in_thread()

def sys.run_in_thread (   f)

Runs the given function in a thread sharing the current global namespace.

◆ thread_id()

def sys.thread_id ( )

Returns the id of the current thread.

◆ clock()

def sys.clock ( )

Get the number of seconds since system startup.

◆ sleep()

def sys.sleep (   seconds)
 Pause the current thread execution for the number of seconds

◆ wait_for()

def sys.wait_for (   func,
  value = True,
  timeout = None,
  check_period = 0 
)
 Wait until a function returns a value, returns True when reached, False on timeout.
 @param func: function to run until it returns the value.
 @param value: return value to wait for. Default True.
 @param timeout: timeout in seconds. If reached returns False. Default None (no timeout).
 @param check_period: time to wait between checks, in seconds. Default 0 (no wait).

Variable Documentation

◆ maxint

int sys.maxint = 0x7FFFFFFF