A class to store and return data to be plotted by flot. @data: A list representing list pairs of x and y data points.
Example: [[0, 3], [10, 3]] That is: [[x, y], [x, y]]... and so on
Valid options are: {
color: color or number label: string lines: specific lines options bars: specific bars options points: specific points options xaxis: 1 or 2 yaxis: 1 or 2 clickable: boolean hoverable: boolean shadowSize: number
}
A generator to produce equal-width columns from string_list
Thanks to ΤΖΩΤΖΙΟΥ (http://stackoverflow.com/users/6899/)
Returns a list of cells encoded in a format jqgrid likes.
Required variables: @header: The column names (must match cell_list). Example:
header = [‘primary_key’, ‘firstname’, ‘lastname’]
]
Optional variables: @id_field_index: The index of the field to use as jqGrid’s ‘id’ parameter. @rows: Number of rows to return. If this is not set all rows will be returned. @sidx: Field to sort the output by. @sord: Either ‘asc’ (ascending) or ‘desc’ (descending). @_search: True or False (whether or not this is a search). Default is False. Also takes strings of ‘true’ and ‘false’. @searchField: The field we’re searching on. @searchOper: The type of search (eq = equals, cn = contains, etc–see the docstring of search_cells for all the operators). @searchString: The string to match for our search. @page: The page number to return (if paginating).
Turns a list of items into a format compatible with jqGrid selection lists.
Returns a mako template object given the path to the template inside a plugin’s directory or zip archive. Note: If the path doesn’t exist on the filesystem this method will attempt to get the file out of the plugin’s zip archive.
Given a tuple of lists (cells) and a header (matching the cells), returns a list of items that match the given search_string, search_field, and search_type.
Valid search types: eq - Equal to ne - Not equal to bw - Begins with ew - Ends with lt - Less than le - Less than or equal to gt - Greater than ge - Greater than or equal to cn - Contains
This function will spawn a thread and run the given function using the args, kwargs and return the given default value if the timeout_duration is exceeded.
(taken from http://stackoverflow.com/questions/492519/timeout-on-a-python-function-call)