| Home | Trees | Index | Help |
|
|---|
| Package picalo :: Package base :: Module Global |
|
| Classes | |
|---|---|
AbstractDecorator |
An abstract decorator that directs all attribute/method access first here, then to the decorated object, then back here (for the first time something is set). |
MessageProgressBarWidget |
Extension to display a message |
| Function Summary | |
|---|---|
Checks to ensure the table is a valid table object, and that the columns are valid columns in the table. | |
Clears the progress bar from the screen. | |
| float |
Returns the number of items in the sequence. |
Creates the given directory, including all required directories. | |
Ensures the name is unique for the columns in the table. | |
Ensures that the name is unique for the names already in the list. | |
Ensures the strings in the list are valid Picalo/Python variables. | |
Returns whether the given varname is a valid python variablename | |
Takes a list of names and adds the appropriate values to each value to ensure each is unique | |
Makes the given variable a valid variable name | |
| object |
With a single sequence argument, return its largest item. |
| float |
Returns the average of the given sequence, or the default if the sequence is empty. |
| object |
With a single sequence argument, return its smallest item. |
Runs the given function on every table in the TableArray. | |
Updates the progress bar with a message and a percentage progress between 0 and 1. | |
| float |
Returns the standard deviation of the given sequence, or the default if the sequence contains zero or one items. |
| int |
Returns the sum of the given sequence of numbers plus the value of start. |
Sets whether Picalo shows progress dialogs in text or GUI mode. | |
| float |
Returns the variance of the given sequence, or the default if the sequence contains zero or one items. |
| Variable Summary | |
|---|---|
SRE_Pattern |
FIRST_LETTER_RE = [A-Za-z_]
|
NoneType |
guiUpdateProgressDialog = None |
NoneType |
lastcaller = None |
float |
lastprogress = 0.0 |
SRE_Pattern |
LETTER_RE = [A-Za-z0-9_]
|
NoneType |
mainframe = None |
MessageProgressBarWidget |
message_widget = <picalo.base.Global.MessageProgressBarW...
|
_RLock |
progress_lock = <_RLock(None, 0)>
|
NoneType |
progressDialog = None |
dict |
RESERVED_COLUMN_NAMES = {'__module__': None, '__str__': ...
|
dict |
TYPE_TO_DB = {<class 'picalo.base.Calendar.Date'>: 'DATE...
|
bool |
useProgress = True
|
SRE_Pattern |
VARIABLE_RE = ^[A-Za-z_][A-Za-z0-9_]*$
|
list |
VARIABLE_TYPES_RE = [[<_sre.SRE_Pattern object at 0x7162...
|
tuple |
widgets = (<picalo.base.Global.MessageProgressBarWidget ...
|
| Function Details |
|---|
check_valid_table(table, *columns)Checks to ensure the table is a valid table object, and that the columns are valid columns in the table. Throws an AssertionError if anything is wrong. |
clear_progress(force=False)Clears the progress bar from the screen. Sometimes multiple functions try to show or clear a progress bar. For example, a top-level script might show a master progress bar and then call load(). The load() function tries to show another progress bar, which Picalo normally circumvents or the load() function would take over the top-level script's progress bar. In other words, the first script to show a progress bar is the only one that can update and/or clear the dialog. By setting force to True, you can override this default behavior. This should not normally be used as it takes control when the top-level script should keep control.
|
count(sequence)Returns the number of items in the sequence. The built in function "len" also gives this value.
|
create_directory(directory)Creates the given directory, including all required directories. This works equally well on Windows and Unix (the os.mkdirs doesn't seem to like c: in paths). |
ensure_unique_colname(table, name)Ensures the name is unique for the columns in the table. It adds _1, _2, _3, and so forth if needed to the name. |
ensure_unique_list_value(lst, name)Ensures that the name is unique for the names already in the list. It adds _1, _2, _3, and so forth if needed to the name. This function is split out because functions like Crosstable need to create the column name list before creating the table. |
ensure_valid_variables(lst, repl='_')Ensures the strings in the list are valid Picalo/Python variables. This is used to create column names during loading picalo tables. This method modifies the lst directly. It also returns the lst for convenience reasons. |
is_valid_variable(varname)Returns whether the given varname is a valid python variablename |
make_unique_colnames(columns)Takes a list of names and adds the appropriate values to each value to ensure each is unique |
make_valid_variable(varname, repl='_')Makes the given variable a valid variable name |
max(*args, **kargs)With a single sequence argument, return its largest item. With two or more arguments, return the largest argument.
|
mean(sequence, default=0)Returns the average of the given sequence, or the default if the sequence is empty. More advanced statistical routines can be found in the picalo.lib.stats module.
|
min(*args, **kargs)With a single sequence argument, return its smallest item. With two or more arguments, return the smallest argument.
|
run_tablearray(msg, func, tablearray, *args, **kargs)Runs the given function on every table in the TableArray. If the function returns a Table, the results are collected into another TableList and returned. It assumes that the first parameter in the function is the table. |
show_progress(msg='', progress=1.0, title='Progress', force=False)Updates the progress bar with a message and a percentage progress between 0 and 1. To remove the progress bar, call clear_progress(). This function is important because it gives feedback to the user. In addition, and perhaps more importantly, it gives the user a cancel button (in GUI mode) that allows the user to cancel your script. Be sure to call show_progress throughout your script. Sometimes multiple functions try to show or clear a progress bar. For example, a top-level script might show a master progress bar and then call load(). The load() function tries to show another progress bar, which Picalo normally circumvents or the load() function would take over the top-level script's progress bar. In other words, the first script to show a progress bar is the only one that can update and/or clear the dialog. By setting force to True, you can override this default behavior. This should not normally be used as it takes control when the top-level script should keep control.
|
stdev(sequence, default=0)Returns the standard deviation of the given sequence, or the default if the sequence contains zero or one items. More advanced statistical routines can be found in the picalo.lib.stats module.
|
sum(sequence, start=0)Returns the sum of the given sequence of numbers plus the value of start. When the sequence is empty, returns start.
|
use_progress_indicators(show)Sets whether Picalo shows progress dialogs in text or GUI mode. Send False into this method to make Picalo quiet. Send True to see progress bars for operations. |
variance(sequence, default=0)Returns the variance of the given sequence, or the default if the sequence contains zero or one items. More advanced statistical routines can be found in the picalo.lib.stats module.
|
| Variable Details |
|---|
FIRST_LETTER_RE
|
guiUpdateProgressDialog
|
lastcaller
|
lastprogress
|
LETTER_RE
|
mainframe
|
message_widget
|
progress_lock
|
progressDialog
|
RESERVED_COLUMN_NAMES
|
useProgress
|
VARIABLE_RE
|
VARIABLE_TYPES_RE
|
widgets
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Mon Aug 20 05:38:17 2007 | http://epydoc.sf.net |