yt.utilities.command_line module

A means of running standalone commands with a shared set of options.

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: argparse.Action

class yt.utilities.command_line.YTBugreportCmd[source]

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ()
description = '\n Report a bug in yt\n\n '
name = 'bugreport'
ndatasets = 1
run(args)
subparser = None
class yt.utilities.command_line.YTCommand[source]

Bases: object

aliases = ()
args = ()
description = ''
name = None
ndatasets = 1
classmethod run(args)[source]
subparser = None
class yt.utilities.command_line.YTCommandSubtype(name, b, d)[source]

Bases: type

mro() → list

return a type’s method resolution order

class yt.utilities.command_line.YTConfigGetCmd[source]

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ({'short': 'section', 'help': 'The section containing the option.'}, {'short': 'option', 'help': 'The option to retrieve.'})
description = 'get a config value'
name = 'get'
ndatasets = 1
run(args)
subparser = 'config'
class yt.utilities.command_line.YTConfigListCmd[source]

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ()
description = 'show the config content'
name = 'list'
ndatasets = 1
run(args)
subparser = 'config'
class yt.utilities.command_line.YTConfigMigrateCmd[source]

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ()
description = 'migrate old config file'
name = 'migrate'
ndatasets = 1
run(args)
subparser = 'config'
class yt.utilities.command_line.YTConfigRemoveCmd[source]

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ({'short': 'section', 'help': 'The section containing the option.'}, {'short': 'option', 'help': 'The option to remove.'})
description = 'remove a config option'
name = 'rm'
ndatasets = 1
run(args)
subparser = 'config'
class yt.utilities.command_line.YTConfigSetCmd[source]

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ({'short': 'section', 'help': 'The section containing the option.'}, {'short': 'option', 'help': 'The option to set.'}, {'short': 'value', 'help': 'The value to set the option to.'})
description = 'set a config value'
name = 'set'
ndatasets = 1
run(args)
subparser = 'config'
class yt.utilities.command_line.YTDeleteImageCmd[source]

Bases: yt.utilities.command_line.YTCommand

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

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ({'short': 'filename', 'action': 'store', 'type': <class 'str'>, 'help': 'The name of the file to download', 'nargs': '?', 'default': ''}, {'short': 'location', 'action': 'store', 'type': <class 'str'>, 'nargs': '?', 'help': 'The location in which to place the file, can be "supp_data_dir", "test_data_dir", or any valid path on disk. ', 'default': ''}, {'longname': '--overwrite', 'short': '-c', 'help': 'Overwrite existing file.', 'action': 'store_true', 'default': False}, {'longname': '--list', 'short': '-l', 'help': 'Display all available files.', 'action': 'store_true', 'default': False})
description = '\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 = 'download'
ndatasets = 1
run(args)
subparser = None
class yt.utilities.command_line.YTHubRegisterCmd[source]

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ()
description = '\n Register a user on the yt Hub: http://hub.yt/\n '
name = 'register'
ndatasets = 1
run(args)
subparser = 'hub'
class yt.utilities.command_line.YTHubStartNotebook[source]

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ({'dest': 'folderId', 'default': '/collection/yt_sandbox/data', 'nargs': '?', 'help': '(Optional) Hub folder to mount inside the Notebook'},)
description = '\n Start the Jupyter Notebook on the yt Hub.\n '
name = 'start'
ndatasets = 1
run(args)
subparser = 'hub'
class yt.utilities.command_line.YTInstInfoCmd[source]

Bases: yt.utilities.command_line.YTCommand

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

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ('ds',)
description = '\n Load a single dataset into an IPython instance\n\n '
name = 'load'
ndatasets = 1
run(args)
subparser = None
class yt.utilities.command_line.YTMapserverCmd[source]

Bases: yt.utilities.command_line.YTCommand

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

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ({'short': '-o', 'longname': '--open-browser', 'action': 'store_true', 'default': False, 'dest': 'open_browser', 'help': 'Open a web browser.'}, {'short': '-p', 'longname': '--port', 'action': 'store', 'default': 0, 'dest': 'port', 'help': 'Port to listen on; defaults to auto-detection.'}, {'short': '-prof', 'longname': '--profile', 'action': 'store', 'default': None, 'dest': 'profile', 'help': 'The IPython profile to use when lauching the kernel.'}, {'short': '-n', 'longname': '--no-password', 'action': 'store_true', 'default': False, 'dest': 'no_password', 'help': 'If set, do not prompt or use a password.'})
description = '\n Start the Jupyter Notebook locally.\n '
name = ['notebook']
ndatasets = 1
run(args)
subparser = None
class yt.utilities.command_line.YTNotebookUploadCmd[source]

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ({'short': 'file', 'type': <class 'str'>},)
description = '\n Upload an IPython Notebook to the yt Hub.\n '
name = 'upload_notebook'
ndatasets = 1
run(args)
subparser = None
class yt.utilities.command_line.YTPastebinCmd[source]

Bases: yt.utilities.command_line.YTCommand

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

Bases: yt.utilities.command_line.YTCommand

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

Bases: yt.utilities.command_line.YTCommand

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

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ({'short': '-t', 'longname': '--task', 'action': 'store', 'default': 0, 'dest': 'task', 'help': 'Open a web browser.'},)
description = '\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 = 'rpdb'
ndatasets = 1
run(args)
subparser = None
class yt.utilities.command_line.YTSearchCmd[source]

Bases: yt.utilities.command_line.YTCommand

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

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ('outputfn', 'bn', 'skip', 'ds', 'field', {'longname': '--max', 'action': 'store_true', 'default': False, 'dest': 'max', 'help': 'Display maximum of field requested through -f option.'}, {'longname': '--min', 'action': 'store_true', 'default': False, 'dest': 'min', 'help': 'Display minimum of field requested through -f option.'})
description = '\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 = 'stats'
ndatasets = 1
run(args)
subparser = None
class yt.utilities.command_line.YTUpdateCmd[source]

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ('all',)
description = '\n Update the yt installation to the most recent version\n\n '
name = 'update'
ndatasets = 1
run(args)
subparser = None
class yt.utilities.command_line.YTUploadFileCmd[source]

Bases: yt.utilities.command_line.YTCommand

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

Bases: yt.utilities.command_line.YTCommand

aliases = ()
args = ({'short': 'file', 'type': <class 'str'>},)
description = '\n Upload an image to imgur.com. Must be PNG.\n\n '
name = 'upload_image'
ndatasets = 1
run(args)
subparser = None
yt.utilities.command_line.bb_apicall(endpoint, data, use_pass=True)[source]
yt.utilities.command_line.run_main()[source]