module funcwin.function_helper

Short summary

module tkinterquickhelper.funcwin.function_helper

Various function needed when using the windows used to ask for parameters

source on GitHub

Functions

function

truncated documentation

extract_function_information

Extracts information about a function. The function assumes all parameters receive a default value.

get_function_list

Extracts all functions in a module.

has_unknown_parameters

Returns True if the function contains a parameter like **params.

private_adjust_parameters

Change the value of some parameters when they are NULL: user. Changes the parameters inplace.

private_get_function

Returns the function object from its name, the name must contains a dot “.” otherwise the function will assume it …

Documentation

Various function needed when using the windows used to ask for parameters

source on GitHub

tkinterquickhelper.funcwin.function_helper.extract_function_information(function)[source]

Extracts information about a function. The function assumes all parameters receive a default value.

Parameters:

function – function object

Returns:

dictionary { info : value }

The returned dictionary will be composed as follows:
  • name: name of the function

  • nbpar: number of parameters

  • param: list of parameters (dictionary) and their default value

  • types: type of parameters (dictionary), if the default value does not exist,

    the function will look in the help looking for the following:

    param    name  (type)
    
  • help: documentation of the function

  • helpparam: help associated to each parameters (dictionary),

    assuming they are described in the documentation using the same format as this docstring

  • module: module which defines the function

source on GitHub

tkinterquickhelper.funcwin.function_helper.get_function_list(module)[source]

Extracts all functions in a module.

Parameters:

module – a object module

Returns:

the list of function included in a module, dictionary { name, object }

source on GitHub

tkinterquickhelper.funcwin.function_helper.has_unknown_parameters(func)[source]

Returns True if the function contains a parameter like **params.

Parameters:

func – function

Returns:

True if the function contains something like **params

source on GitHub

tkinterquickhelper.funcwin.function_helper.private_adjust_parameters(param)[source]

Change the value of some parameters when they are NULL: user. Changes the parameters inplace.

Parameters:

param – list of parameters

source on GitHub

tkinterquickhelper.funcwin.function_helper.private_get_function(function_name)[source]

Returns the function object from its name, the name must contains a dot “.” otherwise the function will assume it is defined in module default_functions.

Parameters:

function_name – name of the function

Returns:

object

source on GitHub