VEX IQ Python API
Classes | Functions
__bi Namespace Reference

Classes

class  AssertionError
 
class  bytearray
 
class  Exception
 
class  object
 

Functions

def abs (n)
 Return the absolute value of a number. More...
 
def float (n)
 Return a floating point number constructed from a number n. More...
 
def round (n, ndigits=0)
 Return the floating point value number rounded to ndigits digits after the decimal point. More...
 
def divmod (a, b)
 Take two (non complex) numbers as arguments and return a pair of numbers consisting of their quotient and remainder when using long division. More...
 
def max (args)
 Return the largest item in the list/tuple or among several arguments. More...
 
def min (args)
 Return the smallest item in the list/tuple or among several arguments. More...
 
def chr (n)
 Return a string of one character whose ASCII code is the integer i. More...
 
def int (n)
 Convert a float, bool or string to an int. More...
 
def str (n)
 Return a string containing a nicely printable representation of an object. More...
 
def dir (o)
 Without arguments, return the list of names in the current local scope; with an argument, attempt to return a list of valid attributes for that object. More...
 
def filter (f, s)
 Constructs a new list from those elements for which function returns true. More...
 
def globals ()
 Return a dictionary representing the current global symbol table. More...
 
def id (o)
 Return the “identity” integer of an object. More...
 
def len (s)
 Return the length (the number of items) of an object. More...
 
def locals ()
 Return a dictionary representing the current local symbol table. More...
 
def map (f, s)
 Apply function to every item of iterable and return a list of the results. More...
 
def ord (s)
 Given a string of length one, return an integer representing the character code. More...
 
def pow (x, y)
 Return x to the power y; equivalent to using the power operator x ** y. More...
 
def range (a, b, c)
 Creates lists containing arithmetic progressions, most often used in for loops. More...
 
def sum (s)
 Returns the sum of all items in a list of numbers. More...
 
def type (o)
 Returns the type of an object (a number) More...
 
def ismain ()
 Returns True if called within a module being run as the main; False otherwise. More...
 

Function Documentation

◆ abs()

def __bi.abs (   n)

Return the absolute value of a number.

◆ float()

def __bi.float (   n)

Return a floating point number constructed from a number n.

Does NOT support parsing strings.

◆ round()

def __bi.round (   n,
  ndigits = 0 
)

Return the floating point value number rounded to ndigits digits after the decimal point.

If ndigits is omitted, it defaults to zero. The result is a floating point number. Values are rounded to the closest multiple of 10 to the power minus ndigits; if two multiples are equally close, rounding is done away from 0 (so. for example, round(0.5) is 1.0 and round(-0.5) is -1.0).

◆ divmod()

def __bi.divmod (   a,
  b 
)

Take two (non complex) numbers as arguments and return a pair of numbers consisting of their quotient and remainder when using long division.

◆ max()

def __bi.max (   args)

Return the largest item in the list/tuple or among several arguments.

◆ min()

def __bi.min (   args)

Return the smallest item in the list/tuple or among several arguments.

◆ chr()

def __bi.chr (   n)

Return a string of one character whose ASCII code is the integer i.

For example, chr(97) returns the string 'a'. This is the inverse of ord(). The argument must be in the range [0..255], inclusive; ValueError will be raised if i is outside that range.

◆ int()

def __bi.int (   n)

Convert a float, bool or string to an int.

◆ str()

def __bi.str (   n)

Return a string containing a nicely printable representation of an object.

For strings, this returns the string itself.

◆ dir()

def __bi.dir (   o)

Without arguments, return the list of names in the current local scope; with an argument, attempt to return a list of valid attributes for that object.

◆ filter()

def __bi.filter (   f,
  s 
)

Constructs a new list from those elements for which function returns true.

Parameters
ffunction returning true to include) or false to exclude an item
slist of items to filter

◆ globals()

def __bi.globals ( )

Return a dictionary representing the current global symbol table.

This is always the dictionary of the current module (inside a function or method, this is the module where it is defined, not the module from which it is called).

◆ id()

def __bi.id (   o)

Return the “identity” integer of an object.

This is an integer which is guaranteed to be unique and constant for this object during its lifetime. Two objects with non-overlapping lifetimes may have the same id() value.

◆ len()

def __bi.len (   s)

Return the length (the number of items) of an object.

The argument may be a sequence (such as a string, tuple, or list) or a collection (such as a dictionary).

◆ locals()

def __bi.locals ( )

Return a dictionary representing the current local symbol table.

◆ map()

def __bi.map (   f,
  s 
)

Apply function to every item of iterable and return a list of the results.

Parameters
ffunction to apply
slist of items

◆ ord()

def __bi.ord (   s)

Given a string of length one, return an integer representing the character code.

For example, ord('a') returns the integer 97. This is the inverse of chr()

◆ pow()

def __bi.pow (   x,
  y 
)

Return x to the power y; equivalent to using the power operator x ** y.

◆ range()

def __bi.range (   a,
  b,
  c 
)

Creates lists containing arithmetic progressions, most often used in for loops.

The arguments must be plain integers. If the step argument is omitted, it defaults to 1. If the start argument is omitted, it defaults to 0. The full form returns a list of plain integers [start, start + step, start + 2 * step, ...]. If step is positive, the last element is the largest start + i * step less than stop; if step is negative, the last element is the smallest start + i * step greater than stop. step must not be zero (or else ValueError is raised). Example:

>>> range(10)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> range(1, 11)
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>> range(0, 30, 5)
[0, 5, 10, 15, 20, 25]
>>> range(0, 10, 3)
[0, 3, 6, 9]
>>> range(0, -10, -1)
[0, -1, -2, -3, -4, -5, -6, -7, -8, -9]
>>> range(0)
[]
>>> range(1, 0)
[]

◆ sum()

def __bi.sum (   s)

Returns the sum of all items in a list of numbers.

◆ type()

def __bi.type (   o)

Returns the type of an object (a number)

◆ ismain()

def __bi.ismain ( )

Returns True if called within a module being run as the main; False otherwise.