CommandItem

Bases: cursesmenu.items.ExternalItem

class cursesmenu.items.CommandItem(text, command, arguments=None, menu=None, should_exit=False)

A menu item to execute a console command

Variables:
  • command (str) – The console command to be executed
  • arguments (list[str]) – An optional list of string arguments to be passed to the command
  • exit_status (int) – the exit status of the command, None if it hasn’t been run yet
action()

This class overrides this method

get_return()
Returns:the exit status of the command
Return type:int