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 = ({'default': '', 'short': 'filename', 'action': 'store', 'help': 'The name of the file to download', 'type': <class 'str'>, 'nargs': '?'}, {'default': '', 'short': 'location', 'action': 'store', 'help': 'The location in which to place the file, can be "supp_data_dir", "test_data_dir", or any valid path on disk. ', 'type': <class 'str'>, 'nargs': '?'}, {'default': False, 'short': '-c', 'action': 'store_true', 'longname': '--overwrite', 'help': 'Overwrite existing file.'}, {'default': False, 'short': '-l', 'action': 'store_true', 'longname': '--list', 'help': 'Display all available files.'})
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 = ({'default': '/collection/yt_sandbox/data', 'help': '(Optional) Hub folder to mount inside the Notebook', 'dest': 'folderId', 'nargs': '?'},)
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 = ({'default': False, 'short': '-u', 'action': 'store_true', 'longname': '--update-source', 'help': 'Update the yt installation, if able'}, {'default': None, 'short': '-o', 'action': 'store', 'help': 'File into which the current revision number will bestored', 'dest': 'outputfile', 'longname': '--output-version'})
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', {'default': 0, 'short': '-a', 'action': 'store', 'help': 'Axis (4 for all three)', 'dest': 'axis', 'type': <class 'int'>, 'longname': '--axis'}, {'default': None, 'short': '-o', 'action': 'store', 'help': 'IP Address to bind on', 'dest': 'host', 'type': <class 'str'>, 'longname': '--host'}, 'ds')
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 = ({'default': False, 'short': '-o', 'action': 'store_true', 'help': 'Open a web browser.', 'dest': 'open_browser', 'longname': '--open-browser'}, {'default': 0, 'short': '-p', 'action': 'store', 'help': 'Port to listen on; defaults to auto-detection.', 'dest': 'port', 'longname': '--port'}, {'default': None, 'short': '-prof', 'action': 'store', 'help': 'The IPython profile to use when lauching the kernel.', 'dest': 'profile', 'longname': '--profile'}, {'default': False, 'short': '-n', 'action': 'store_true', 'help': 'If set, do not prompt or use a password.', 'dest': 'no_password', 'longname': '--no-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 = ({'default': None, 'short': '-l', 'action': 'store', 'help': 'Use syntax highlighter for the file in language', 'dest': 'language', 'longname': '--language'}, {'default': False, 'short': '-L', 'action': 'store_true', 'help': 'Retrive a list of supported languages', 'dest': 'languages', 'longname': '--languages'}, {'default': 'utf-8', 'short': '-e', 'action': 'store', 'help': 'Specify the encoding of a file (default is utf-8 or guessing if available)', 'dest': 'encoding', 'longname': '--encoding'}, {'default': False, 'short': '-b', 'action': 'store_true', 'help': 'Open the paste in a web browser', 'dest': 'open_browser', 'longname': '--open-browser'}, {'default': False, 'short': '-p', 'action': 'store_true', 'help': 'Paste as private', 'dest': 'private', 'longname': '--private'}, {'default': False, 'short': '-c', 'action': 'store_true', 'help': 'File to output to; else, print.', 'dest': 'clipboard', 'longname': '--clipboard'}, {'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', {'default': None, 'short': '-fu', 'action': 'store', 'help': 'Desired field units', 'dest': 'field_unit', 'type': <class 'str'>, 'longname': '--field-unit'})
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 = ({'default': 0, 'short': '-t', 'action': 'store', 'help': 'Open a web browser.', 'dest': 'task', 'longname': '--task'},)
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 = ({'default': 'yt_index.json', 'short': '-o', 'action': 'store', 'help': 'File in which to place output', 'dest': 'output', 'type': <class 'str'>, 'longname': '--output'}, {'default': False, 'short': '-a', 'action': 'store_true', 'help': 'Attempt to load every file', 'dest': 'check_all', 'longname': '--check-all'}, {'default': False, 'short': '-f', 'action': 'store_true', 'help': 'Output full contents of parameter file', 'dest': 'full_output', 'longname': '--full'})
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', {'default': False, 'dest': 'max', 'action': 'store_true', 'longname': '--max', 'help': 'Display maximum of field requested through -f option.'}, {'default': False, 'dest': 'min', 'action': 'store_true', 'longname': '--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]