corelp.user_inputs module
- corelp.user_inputs()[source]
Return a dictionary of variables defined by the user in the interactive environment.
This function is intended for use inside other functions via
function(**user_inputs()). It should not be used to store its return value, e.g. do not do:variable = user_inputs()
Instead, call it directly when needed.
- Returns:
A dictionary containing the user’s currently defined variables.
- Return type:
dict
Examples
>>> from corelp import user_inputs >>> user_inputs() # First call (initializes and clears import-related variables) {} >>> a = 1 # User defines a variable >>> user_inputs() # Now returns: {'a': 1} {'a': 1}