Utilities for holding and displaying data about input parameters.
Imported modules
|
|
from cmldict import cmldict
import modulecheck
import re
import sys
|
Functions
|
|
commandline2dict
createInputPrm
typeguess
|
|
commandline2dict
|
commandline2dict ( argv, parameters )
Load data from the command line into a dictionary of
parameter values. The argv argument is typically sys.argv[1:].
Each option --opt in argv is extracted and the
proceeding value v is assigned to parameters:
parameters[opt].set(v)
Hence, parameters must hold objects that have a set
function. Normally, parameters is a dictionary of
InputPrm objects.
|
|
createInputPrm
|
createInputPrm (
interface,
name,
default,
str2type,
widget_type='entry',
values=None,
parent=None,
form=None,
help=None,
unit=None,
cmlarg=None,
)
Unified interface to parameter classes InputPrm/GUI/CGI.
Exceptions
|
|
ValueError, "interface '%s' not supported" % interface
|
|
|
typeguess
|
typeguess ( s )
Given a string s, determine if s is int, float or just a string.
|
Classes
|
|
AutoSimVizCGI |
Organize a set of form variables for input data.
|
AutoSimVizGUI |
Organize a set of widgets for input data together with
|
InputPrm |
Class for holding data about a parameter.
|
InputPrmCGI |
Represent a parameter by a form variable in HTML.
|
InputPrmGUI |
Represent an input parameter by a widget.
|
Parameters |
Class for holding a set of InputPrm-type parameters.
|
|
|