| |
- __import__(no arg info)
- __import__(name, globals, locals, fromlist) -> module
- Import a module. The globals are only used to determine the context;
- they are not modified. The locals are currently unused. The fromlist
- should be a list of names to emulate ``from name import ...'', or an
- empty list to emulate ``import name''.
- When importing a module from a package, note that __import__('A.B', ...)
- returns package A when fromlist is empty, but its submodule B when
- fromlist is not empty.
- abs(no arg info)
- abs(number) -> number
- Return the absolute value of the argument.
- apply(no arg info)
- apply(function, args[, kwargs]) -> value
- Call a function with positional arguments taken from the tuple args,
- and keyword arguments taken from the optional dictionary kwargs.
- buffer(no arg info)
- buffer(object [, offset[, size]) -> object
- Creates a new buffer object which references the given object.
- The buffer will reference a slice of the target object from the
- start of the object (or at the specified offset). The slice will
- extend to the end of the target object (or with the specified size).
- callable(no arg info)
- callable(object) -> Boolean
- Return whether the object is callable (i.e., some kind of function).
- Note that classes are callable, as are instances with a __call__() method.
- chr(no arg info)
- chr(i) -> character
- Return a string of one character with ordinal i; 0 <= i < 256.
- cmp(no arg info)
- cmp(x, y) -> integer
- Return negative if x<y, zero if x==y, positive if x>y.
- coerce(no arg info)
- coerce(x, y) -> None or (x1, y1)
- When x and y can be coerced to values of the same type, return a tuple
- containing the coerced values. When they can't be coerced, return None.
- compile(no arg info)
- compile(source, filename, mode) -> code object
- Compile the source string (a Python module, statement or expression)
- into a code object that can be executed by the exec statement or eval().
- The filename will be used for run-time error messages.
- The mode must be 'exec' to compile a module, 'single' to compile a
- single (interactive) statement, or 'eval' to compile an expression.
- complex(no arg info)
- complex(real[, imag]) -> complex number
- Create a complex number from a real part and an optional imaginary part.
- This is equivalent to (real + imag*1j) where imag defaults to 0.
- delattr(no arg info)
- delattr(object, name)
- Delete a named attribute on an object; delattr(x, 'y') is equivalent to
- ``del x.y''.
- dir(no arg info)
- dir([object]) -> list of strings
- Return an alphabetized list of names comprising (some of) the attributes
- of the given object. Without an argument, the names in the current scope
- are listed. With an instance argument, only the instance attributes are
- returned. With a class argument, attributes of the base class are not
- returned. For other types or arguments, this may list members or methods.
- divmod(no arg info)
- divmod(x, y) -> (div, mod)
- Return the tuple ((x-x%y)/y, x%y). Invariant: div*y + mod == x.
- eval(no arg info)
- eval(source[, globals[, locals]]) -> value
- Evaluate the source in the context of globals and locals.
- The source may be a string representing a Python expression
- or a code object as returned by compile().
- The globals and locals are dictionaries, defaulting to the current
- globals and locals. If only globals is given, locals defaults to it.
- execfile(no arg info)
- execfile(filename[, globals[, locals]])
- Read and execute a Python script from a file.
- The globals and locals are dictionaries, defaulting to the current
- globals and locals. If only globals is given, locals defaults to it.
- filter(no arg info)
- filter(function, sequence) -> list
- Return a list containing those items of sequence for which function(item)
- is true. If function is None, return a list of items that are true.
- float(no arg info)
- float(x) -> floating point number
- Convert a string or number to a floating point number, if possible.
- getattr(no arg info)
- getattr(object, name[, default]) -> value
- Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.
- When a default argument is given, it is returned when the attribute doesn't
- exist; without it, an exception is raised in that case.
- globals(no arg info)
- globals() -> dictionary
- Return the dictionary containing the current scope's global variables.
- hasattr(no arg info)
- hasattr(object, name) -> Boolean
- Return whether the object has an attribute with the given name.
- (This is done by calling getattr(object, name) and catching exceptions.)
- hash(no arg info)
- hash(object) -> integer
- Return a hash value for the object. Two objects with the same value have
- the same hash value. The reverse is not necessarily true, but likely.
- hex(no arg info)
- hex(number) -> string
- Return the hexadecimal representation of an integer or long integer.
- id(no arg info)
- id(object) -> integer
- Return the identity of an object. This is guaranteed to be unique among
- simultaneously existing objects. (Hint: it's the object's memory address.)
- input(no arg info)
- input([prompt]) -> value
- Equivalent to eval(raw_input(prompt)).
- int(no arg info)
- int(x) -> integer
- Convert a string or number to an integer, if possible.
- A floating point argument will be truncated towards zero.
- intern(no arg info)
- intern(string) -> string
- ``Intern'' the given string. This enters the string in the (global)
- table of interned strings whose purpose is to speed up dictionary lookups.
- Return the string itself or the previously interned string object with the
- same value.
- isinstance(no arg info)
- isinstance(object, class-or-type) -> Boolean
- Return whether an object is an instance of a class or of a subclass thereof.
- With a type as second argument, return whether that is the object's type.
- issubclass(no arg info)
- issubclass(C, B) -> Boolean
- Return whether class C is a subclass (i.e., a derived class) of class B.
- len(no arg info)
- len(object) -> integer
- Return the number of items of a sequence or mapping.
- list(no arg info)
- list(sequence) -> list
- Return a new list whose items are the same as those of the argument sequence.
- locals(no arg info)
- locals() -> dictionary
- Return the dictionary containing the current scope's local variables.
- long(no arg info)
- long(x) -> long integer
- Convert a string or number to a long integer, if possible.
- A floating point argument will be truncated towards zero.
- map(no arg info)
- map(function, sequence[, sequence, ...]) -> list
- Return a list of the results of applying the function to the items of
- the argument sequence(s). If more than one sequence is given, the
- function is called with an argument list consisting of the corresponding
- item of each sequence, substituting None for missing values when not all
- sequences have the same length. If the function is None, return a list of
- the items of the sequence (or a list of tuples if more than one sequence).
- max(no arg info)
- max(sequence) -> value
- max(a, b, c, ...) -> value
- With a single sequence argument, return its largest item.
- With two or more arguments, return the largest argument.
- min(no arg info)
- min(sequence) -> value
- min(a, b, c, ...) -> value
- With a single sequence argument, return its smallest item.
- With two or more arguments, return the smallest argument.
- oct(no arg info)
- oct(number) -> string
- Return the octal representation of an integer or long integer.
- open(no arg info)
- open(filename[, mode[, buffering]]) -> file object
- Open a file. The mode can be 'r', 'w' or 'a' for reading (default),
- writing or appending. The file will be created if it doesn't exist
- when opened for writing or appending; it will be truncated when
- opened for writing. Add a 'b' to the mode for binary files.
- Add a '+' to the mode to allow simultaneous reading and writing.
- If the buffering argument is given, 0 means unbuffered, 1 means line
- buffered, and larger numbers specify the buffer size.
- ord(no arg info)
- ord(c) -> integer
- Return the integer ordinal of a one character string.
- pow(no arg info)
- pow(x, y[, z]) -> number
- With two arguments, equivalent to x**y. With three arguments,
- equivalent to (x**y) % z, but may be more efficient (e.g. for longs).
- range(no arg info)
- range([start,] stop[, step]) -> list of integers
- Return a list containing an arithmetic progression of integers.
- range(i, j) returns [i, i+1, i+2, ..., j-1]; start (!) defaults to 0.
- When step is given, it specifies the increment (or decrement).
- For example, range(4) returns [0, 1, 2, 3]. The end point is omitted!
- These are exactly the valid indices for a list of 4 elements.
- raw_input(no arg info)
- raw_input([prompt]) -> string
- Read a string from standard input. The trailing newline is stripped.
- If the user hits EOF (Unix: Ctl-D, Windows: Ctl-Z+Return), raise EOFError.
- On Unix, GNU readline is used if enabled. The prompt string, if given,
- is printed without a trailing newline before reading.
- reduce(no arg info)
- reduce(function, sequence[, initial]) -> value
- Apply a function of two arguments cumulatively to the items of a sequence,
- from left to right, so as to reduce the sequence to a single value.
- For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates
- ((((1+2)+3)+4)+5). If initial is present, it is placed before the items
- of the sequence in the calculation, and serves as a default when the
- sequence is empty.
- reload(no arg info)
- reload(module) -> module
- Reload the module. The module must have been successfully imported before.
- repr(no arg info)
- repr(object) -> string
- Return the canonical string representation of the object.
- For most object types, eval(repr(object)) == object.
- round(no arg info)
- round(number[, ndigits]) -> floating point number
- Round a number to a given precision in decimal digits (default 0 digits).
- This always returns a floating point number. Precision may be negative.
- setattr(no arg info)
- setattr(object, name, value)
- Set a named attribute on an object; setattr(x, 'y', v) is equivalent to
- ``x.y = v''.
- slice(no arg info)
- slice([start,] step[, stop]) -> slice object
- Create a slice object. This is used for slicing by the Numeric extensions.
- str(no arg info)
- str(object) -> string
- Return a nice string representation of the object.
- If the argument is a string, the return value is the same object.
- tuple(no arg info)
- tuple(sequence) -> list
- Return a tuple whose items are the same as those of the argument sequence.
- If the argument is a tuple, the return value is the same object.
- type(no arg info)
- type(object) -> type object
- Return the type of the object.
- vars(no arg info)
- vars([object]) -> dictionary
- Without arguments, equivalent to locals().
- With an argument, equivalent to object.__dict__.
- xrange(no arg info)
- xrange([start,] stop[, step]) -> xrange object
- Like range(), but instead of returning a list, returns an object that
- generates the numbers in the range on demand. This is slightly slower
- than range() but more memory efficient.
|