VEX IQ Python API
|
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... | |
def __bi.abs | ( | n | ) |
Return the absolute value of a number.
def __bi.float | ( | n | ) |
Return a floating point number constructed from a number n.
Does NOT support parsing strings.
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).
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.
def __bi.max | ( | args | ) |
Return the largest item in the list/tuple or among several arguments.
def __bi.min | ( | args | ) |
Return the smallest item in the list/tuple or among several arguments.
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.
def __bi.int | ( | n | ) |
Convert a float, bool or string to an int.
def __bi.str | ( | n | ) |
Return a string containing a nicely printable representation of an object.
For strings, this returns the string itself.
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.
def __bi.filter | ( | f, | |
s | |||
) |
Constructs a new list from those elements for which function returns true.
f | function returning true to include) or false to exclude an item |
s | list of items to filter |
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).
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.
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).
def __bi.locals | ( | ) |
Return a dictionary representing the current local symbol table.
def __bi.map | ( | f, | |
s | |||
) |
Apply function to every item of iterable and return a list of the results.
f | function to apply |
s | list of items |
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()
def __bi.pow | ( | x, | |
y | |||
) |
Return x to the power y; equivalent to using the power operator x ** y.
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:
def __bi.sum | ( | s | ) |
Returns the sum of all items in a list of numbers.
def __bi.type | ( | o | ) |
Returns the type of an object (a number)
def __bi.ismain | ( | ) |
Returns True if called within a module being run as the main; False otherwise.