Warning
This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
galaxy.util.pastescript package¶
Command for loading and serving wsgi apps taken from PasteScript
Submodules¶
galaxy.util.pastescript.loadwsgi module¶
galaxy.util.pastescript.serve module¶
-
galaxy.util.pastescript.serve.
difflib
= None¶ A subclass of
optparse.OptionParser
that allows boolean long options (like--verbose
) to also take arguments (like--verbose=true
). Arguments must use=
.
-
class
galaxy.util.pastescript.serve.
BoolOptionParser
(usage=None, option_list=None, option_class=<class 'optparse.Option'>, version=None, conflict_handler='error', description=None, formatter=None, add_help_option=True, prog=None, epilog=None)[source]¶ Bases:
optparse.OptionParser
-
exception
galaxy.util.pastescript.serve.
BadCommand
(message, exit_code=2)[source]¶ Bases:
Exception
-
__init__
(message, exit_code=2)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
property
message
¶ Getter for ‘message’; needed only to override deprecation in BaseException.
-
-
class
galaxy.util.pastescript.serve.
Command
(name)[source]¶ Bases:
object
-
max_args
= None¶
-
max_args_error
= 'You must provide no more than %(max_args)s arguments'¶
-
min_args_error
= 'You must provide at least %(min_args)s arguments'¶
-
group_name
= ''¶
-
required_args
= ()¶
-
usage
= ''¶
-
default_verbosity
= 0¶
-
default_interactive
= 0¶
-
return_code
= 0¶
-
exception
BadCommand
(message, exit_code=2)¶ Bases:
Exception
-
__init__
(message, exit_code=2)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
message
¶ Getter for ‘message’; needed only to override deprecation in BaseException.
-
-
classmethod
standard_parser
(verbose=True, interactive=False, no_interactive=False, simulate=False, quiet=False, overwrite=False)¶ Create a standard
OptionParser
instance.Typically used like:
class MyCommand(Command): parser = Command.standard_parser()
Subclasses may redefine
standard_parser
, so use the nearest superclass’s class method.
-
-
class
galaxy.util.pastescript.serve.
ServeCommand
(name)[source]¶ Bases:
galaxy.util.pastescript.serve.Command
-
usage
= 'CONFIG_FILE [start|stop|restart|status] [var=value]'¶
-
summary
= 'Serve the described application'¶
-
description
: Optional[str] = " This command serves a web application that uses a paste.deploy\n configuration file for the server and application.\n\n If start/stop/restart is given, then --daemon is implied, and it will\n start (normal operation), stop (--stop-daemon), or do both.\n\n You can also include variable assignments like 'http_port=8080'\n and then use %(http_port)s in your config files.\n "¶
-
requires_config_file
= True¶
-
parser
= <galaxy.util.pastescript.serve.BoolOptionParser object>¶
-
default_verbosity
= 1¶
-
possible_subcommands
= ('start', 'stop', 'restart', 'status')¶
-
-
class
galaxy.util.pastescript.serve.
LazyWriter
(filename, mode='w')[source]¶ Bases:
object
File-like object that opens a file lazily when it is first written to.
-
galaxy.util.pastescript.serve.
live_pidfile
(pidfile)[source]¶ (pidfile:str) -> int | None Returns an int found in the named file, if there is one, and if there is a running process with that process id. Return None if no such process exists.