py4cytoscape.commands.commands_help

commands_help(cmd_string='help', base_url='http://127.0.0.1:1234/v1')[source]

Commands Help.

Using the same syntax as Cytoscape’s Command Line Dialog, this function returns a list of available commands or args. Works with or without ‘help’ command prefix. Note that if you ask about a command that doesn’t have any arguments, this function will run the command!

Parameters
  • cmd_string (str) – command

  • base_url (str) – Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://127.0.0.1:1234 and the latest version of the CyREST API supported by this version of py4cytoscape.

Returns

a list of lines in the command result (omitting the “Finished” line at the end)

Return type

list

Raises
  • CyError – if command has an error

  • requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error

Examples

>>> commands_help('apps')
['disable', 'enable', 'information', 'install', 'list available', 'list disabled', ...]