API Reference for Enthought Tool Suite 3.2.0
Utility functions for getting information about and manipulating Blocks.
Global logger
logger = logging.getLogger(__name__)
Given a block and an From ast node, search the block for an existing From statement that can accomodate the imports in argument. If sucessful, augments the existing statement and returns the modified sub_block. Otherwise, returns None.
Returns the index of the first non-import and non-function-def statement in a block's sub_blocks. If there are none, returns -1.
Returns the index of the first non-import statement in a block's sub blocks. If there are no non-import statements, returns -1.
Return all the function names within a block.
Replace all references to 'old' with 'new'.
Setting values in a BlockVariable to be either int, float, or numpy.ndarray. The latter is evaluated depending on the user's input as 'numpy.arange' or 'arange'; 'numpy.array' or 'array'; or, 'numpy.ndarray' or 'ndarray'
value : Str
| Local name | Refers to |
|---|---|
| Block | enthought.blocks.block.Block |
| copy | copy.copy |
| From | compiler.ast.From |
| Function | compiler.ast.Function |
| Getattr | compiler.ast.Getattr |
| Import | compiler.ast.Import |
| logging | logging |
| numpy | numpy |
| walk | enthought.blocks.analysis.walk |
© Copyright 2002-2009 Enthought, Inc.