yt.utilities.command_line module

class yt.utilities.command_line.FileStreamer(f, final_size=None)[source]

Bases: object

chunksize = 102400
final_size = None
next_sent = 0
class yt.utilities.command_line.GetParameterFiles(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: Action

format_usage()
class yt.utilities.command_line.YTCommand[source]

Bases: object

aliases = ()
args: tuple[str | dict[str, Any], ...] = ()
description: str = ''
name: str | list[str] | None = None
ndatasets: int = 1
classmethod run(args)[source]
subparser: str | None = None
class yt.utilities.command_line.YTCommandSubtype(name, b, d)[source]

Bases: type

mro()

Return a type’s method resolution order.

class yt.utilities.command_line.YTConfigGetCmd[source]

Bases: YTCommand, YTConfigLocalConfigHandler

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'help': 'The section containing the option.', 'short': 'section'}, {'help': 'The option to retrieve.', 'short': 'option'}, {'action': 'store_true', 'help': 'Store the configuration in the local configuration file.', 'short': '--local'}, {'action': 'store_true', 'help': 'Store the configuration in the global configuration file.', 'short': '--global'})
description: str = 'get a config value'
load_config(args) None
name: str | list[str] | None = 'get'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = 'config'
class yt.utilities.command_line.YTConfigListCmd[source]

Bases: YTCommand, YTConfigLocalConfigHandler

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'action': 'store_true', 'help': 'Store the configuration in the local configuration file.', 'short': '--local'}, {'action': 'store_true', 'help': 'Store the configuration in the global configuration file.', 'short': '--global'})
description: str = 'show the config content'
load_config(args) None
name: str | list[str] | None = 'list'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = 'config'
class yt.utilities.command_line.YTConfigLocalConfigHandler[source]

Bases: object

load_config(args) None[source]
class yt.utilities.command_line.YTConfigPrintPath[source]

Bases: YTCommand, YTConfigLocalConfigHandler

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'action': 'store_true', 'help': 'Store the configuration in the local configuration file.', 'short': '--local'}, {'action': 'store_true', 'help': 'Store the configuration in the global configuration file.', 'short': '--global'})
description: str = 'show path to the config file'
load_config(args) None
name: str | list[str] | None = 'print-path'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = 'config'
class yt.utilities.command_line.YTConfigRemoveCmd[source]

Bases: YTCommand, YTConfigLocalConfigHandler

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'help': 'The section containing the option.', 'short': 'section'}, {'help': 'The option to remove.', 'short': 'option'}, {'action': 'store_true', 'help': 'Store the configuration in the local configuration file.', 'short': '--local'}, {'action': 'store_true', 'help': 'Store the configuration in the global configuration file.', 'short': '--global'})
description: str = 'remove a config option'
load_config(args) None
name: str | list[str] | None = 'rm'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = 'config'
class yt.utilities.command_line.YTConfigSetCmd[source]

Bases: YTCommand, YTConfigLocalConfigHandler

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'help': 'The section containing the option.', 'short': 'section'}, {'help': 'The option to set.', 'short': 'option'}, {'help': 'The value to set the option to.', 'short': 'value'}, {'action': 'store_true', 'help': 'Store the configuration in the local configuration file.', 'short': '--local'}, {'action': 'store_true', 'help': 'Store the configuration in the global configuration file.', 'short': '--global'})
description: str = 'set a config value'
load_config(args) None
name: str | list[str] | None = 'set'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = 'config'
class yt.utilities.command_line.YTDeleteImageCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'short': 'delete_hash', 'type': <class 'str'>},)
description: str = '\n        Delete image from imgur.com.\n\n        '
name: str | list[str] | None = 'delete_image'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTDownloadData[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'action': 'store', 'default': '', 'help': 'The name of the file to download', 'nargs': '?', 'short': 'filename', 'type': <class 'str'>}, {'action': 'store', 'default': '', 'help': 'The location in which to place the file, can be "supp_data_dir", "test_data_dir", or any valid path on disk. ', 'nargs': '?', 'short': 'location', 'type': <class 'str'>}, {'action': 'store_true', 'default': False, 'help': 'Overwrite existing file.', 'longname': '--overwrite', 'short': '-c'}, {'action': 'store_true', 'default': False, 'help': 'Display all available files.', 'longname': '--list', 'short': '-l'})
description: str = '\n        Download a file from http://yt-project.org/data and save it to a\n        particular location. Files can be saved to the locations provided\n        by the "test_data_dir" or "supp_data_dir" configuration entries, or\n        any valid path to a location on disk.\n        '
get_list()[source]
name: str | list[str] | None = 'download'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTInstInfoCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'action': 'store_true', 'default': False, 'help': 'Update the yt installation, if able', 'longname': '--update-source', 'short': '-u'}, {'action': 'store', 'default': None, 'dest': 'outputfile', 'help': 'File into which the current revision number will be stored', 'longname': '--output-version', 'short': '-o'})
description: str = '\n        Get some information about the yt installation\n\n        '
name: str | list[str] | None = ['instinfo', 'version']
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTLoadCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ('ds',)
description: str = '\n        Load a single dataset into an IPython instance\n\n        '
name: str | list[str] | None = 'load'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTMapserverCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ('proj', 'field', 'weight', 'linear', 'center', 'width', 'cmap', {'action': 'store', 'default': 0, 'dest': 'axis', 'help': 'Axis', 'longname': '--axis', 'short': '-a', 'type': <class 'int'>}, {'action': 'store', 'default': None, 'dest': 'host', 'help': 'IP Address to bind on', 'longname': '--host', 'short': '-o', 'type': <class 'str'>}, {'help': 'The dataset to load.', 'nargs': 1, 'short': 'ds', 'type': <class 'str'>})
description: str = '\n        Serve a plot in a GMaps-style interface\n\n        '
name: str | list[str] | None = 'mapserver'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTPastebinCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'action': 'store', 'default': None, 'dest': 'language', 'help': 'Use syntax highlighter for the file in language', 'longname': '--language', 'short': '-l'}, {'action': 'store_true', 'default': False, 'dest': 'languages', 'help': 'Retrieve a list of supported languages', 'longname': '--languages', 'short': '-L'}, {'action': 'store', 'default': 'utf-8', 'dest': 'encoding', 'help': 'Specify the encoding of a file (default is utf-8 or guessing if available)', 'longname': '--encoding', 'short': '-e'}, {'action': 'store_true', 'default': False, 'dest': 'open_browser', 'help': 'Open the paste in a web browser', 'longname': '--open-browser', 'short': '-b'}, {'action': 'store_true', 'default': False, 'dest': 'private', 'help': 'Paste as private', 'longname': '--private', 'short': '-p'}, {'action': 'store_true', 'default': False, 'dest': 'clipboard', 'help': 'File to output to; else, print.', 'longname': '--clipboard', 'short': '-c'}, {'short': 'file', 'type': <class 'str'>})
description: str = '\n        Post a script to an anonymous pastebin\n\n        '
name: str | list[str] | None = 'pastebin'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTPastebinGrabCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'short': 'number', 'type': <class 'str'>},)
description: str = '\n        Print an online pastebin to STDOUT for local use.\n        '
name: str | list[str] | None = 'pastebin_grab'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTPlotCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ('width', 'unit', 'bn', 'proj', 'center', 'zlim', 'axis', 'field', 'weight', 'skip', 'cmap', 'output', 'grids', 'time', 'ds', 'max', 'log', 'linear', {'action': 'store', 'default': None, 'dest': 'field_unit', 'help': 'Desired field units', 'longname': '--field-unit', 'short': '-fu', 'type': <class 'str'>}, {'action': 'store_true', 'help': 'Annotate the plot with the scale', 'longname': '--show-scale-bar'})
description: str = '\n        Create a set of images\n\n        '
name: str | list[str] | None = 'plot'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTRPDBCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'action': 'store', 'default': 0, 'dest': 'task', 'help': 'Open a web browser.', 'longname': '--task', 'short': '-t'},)
description: str = '\n        Connect to a currently running (on localhost) rpd session.\n\n        Commands run with --rpdb will trigger an rpdb session with any\n        uncaught exceptions.\n\n        '
name: str | list[str] | None = 'rpdb'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTSearchCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'action': 'store', 'default': 'yt_index.json', 'dest': 'output', 'help': 'File in which to place output', 'longname': '--output', 'short': '-o', 'type': <class 'str'>}, {'action': 'store_true', 'default': False, 'dest': 'check_all', 'help': 'Attempt to load every file', 'longname': '--check-all', 'short': '-a'}, {'action': 'store_true', 'default': False, 'dest': 'full_output', 'help': 'Output full contents of parameter file', 'longname': '--full', 'short': '-f'})
description: str = '\n        Attempt to find outputs that yt can recognize in directories.\n        '
name: str | list[str] | None = 'search'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTStatsCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ('outputfn', 'bn', 'skip', 'ds', 'field', {'action': 'store_true', 'default': False, 'dest': 'max', 'help': 'Display maximum of field requested through -f option.', 'longname': '--max'}, {'action': 'store_true', 'default': False, 'dest': 'min', 'help': 'Display minimum of field requested through -f option.', 'longname': '--min'})
description: str = '\n        Print stats and max/min value of a given field (if requested),\n        for one or more datasets\n\n        (default field is density)\n\n        '
name: str | list[str] | None = 'stats'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTUpdateCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ('all',)
description: str = '\n        Update the yt installation to the most recent version\n\n        '
name: str | list[str] | None = 'update'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTUploadFileCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'short': 'file', 'type': <class 'str'>},)
description: str = "\n        Upload a file to yt's curldrop.\n\n        "
name: str | list[str] | None = 'upload'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
class yt.utilities.command_line.YTUploadImageCmd[source]

Bases: YTCommand

aliases = ()
args: tuple[str | dict[str, Any], ...] = ({'short': 'file', 'type': <class 'str'>},)
description: str = '\n        Upload an image to imgur.com.  Must be PNG.\n\n        '
name: str | list[str] | None = 'upload_image'
ndatasets: int = 1
classmethod run(args)
subparser: str | None = None
yt.utilities.command_line.run_main()[source]