Module Import alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body AugAssignAdd NameStore Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore BinOpAdd Str NameLoad Assign NameStore NameLoad For NameStore NameLoad body AugAssignAdd NameStore BinOpAdd Call NameLoad NameLoad Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Return BinOpAdd ListLoad Str NameLoad NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Return SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num decorator_list FunctionDef arguments args NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Slice Num If UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Assign NameStore SubscriptLoad NameLoad Slice Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If CompareEq Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Return Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore Dict Str Str ListLoad SubscriptLoad NameLoad Index Str ListLoad Assign NameStore SubscriptLoad NameLoad Index Str If Call NameLoad NameLoad Str body Print Call AttributeLoad NameLoad attr orelse For NameStore NameLoad body Print NameLoad For NameStore SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Print Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Print BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad Str body Return Call AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Return Call NameLoad AttributeLoad NameLoad attr Str NameLoad decorator_list decorator_list
N/A N/A os giotto.utils parse_kwargs giotto.controllers GiottoController giotto.control Redirection N/A cmd_execution_snippet 
args = sys.argv
mock = '--model-mock' in args
if mock:
    # remove the mock argument so the controller doesn't get confused
    args.pop(args.index('--model-mock'))
from giotto.controllers.cmd import CMDController, CMDRequest
request = CMDRequest(sys.argv)
controller = CMDController(request=request, manifest=manifest, model_mock=mock)
controller.get_response() make_cmd_invocation N/A N/A invocation args kwargs N/A N/A N/A 
    >>> make_cmd_invocation('path/program', ['arg1', 'arg2'], {'darg': 4})
    ['./giotto-cmd', '/path/program/arg1/arg2/', '--darg=4']
     N/A N/A N/A N/A invocation endswith / N/A N/A invocation / N/A N/A N/A N/A invocation startswith / N/A N/A invocation N/A / invocation N/A cmd invocation N/A arg args N/A N/A cmd N/A N/A str arg / N/A rendered_kwargs N/A N/A N/A k v N/A N/A kwargs items N/A N/A N/A N/A rendered_kwargs append N/A --%s=%s N/A k v N/A N/A N/A ./giotto-cmd cmd rendered_kwargs N/A CMDRequest N/A object N/A __init__ N/A N/A self argv N/A N/A N/A N/A self enviornment N/A os environ N/A N/A self argv argv N/A N/A CMDController N/A GiottoController N/A N/A 
    Basic command line cntroller class. self.request will be the value found
    in sys.argv; a list of commandline arguments with the first item being the 
    name of the script ('giotto'), the second being the name of th program
    and the rest being commandline arguments.
     N/A name cmd N/A default_mimetype text/x-cmd get_invocation N/A N/A self N/A N/A N/A N/A N/A N/A self request argv N/A 1 N/A get_controller_name N/A N/A self N/A N/A N/A cmd N/A get_raw_data N/A N/A self N/A N/A N/A 
        Parse the raw commandline arguments (from sys.argv) to a dictionary
        that is understandable to the rest of the framework.
         N/A arguments N/A N/A N/A self request argv N/A 1 N/A N/A N/A N/A N/A arguments N/A 0 startswith -- N/A N/A arguments N/A arguments N/A 1 N/A N/A parse_kwargs arguments N/A get_concrete_response N/A N/A self N/A N/A N/A result N/A N/A self get_data_response N/A N/A N/A type result Redirection N/A N/A N/A invocation args kwargs N/A result rendered_invocation N/A rendered_invocation N/A make_cmd_invocation invocation args kwargs N/A req N/A CMDRequest rendered_invocation N/A N/A CMDController req N/A self manifest N/A self model_mock N/A N/A response N/A stdout stderr N/A N/A result N/A body N/A N/A stdout N/A response N/A stdout N/A N/A hasattr stdout write N/A N/A N/A N/A stdout write N/A N/A line stdout N/A N/A line N/A line N/A response N/A stderr N/A N/A N/A N/A N/A sys stderr write line N/A persist N/A N/A self persist response N/A N/A N/A persist
================ N/A N/A key value N/A N/A persist iteritems N/A N/A N/A export %s=%s N/A N/A N/A key upper value N/A get_primitive N/A N/A self name N/A N/A N/A N/A name ALL_DATA N/A N/A N/A N/A self get_raw_data N/A N/A N/A name LOGGED_IN_USER N/A N/A N/A getattr N/A self request user None N/A N/A