pyre.shells¶
Submodules¶
pyre.shells.ANSIpyre.shells.ASCIIpyre.shells.Actionpyre.shells.Applicationpyre.shells.CSIpyre.shells.Commandpyre.shells.Daemonpyre.shells.Directorpyre.shells.Executivepyre.shells.Forkpyre.shells.IPythonpyre.shells.Interactivepyre.shells.Layoutpyre.shells.Panelpyre.shells.Plainpyre.shells.Plexuspyre.shells.Rendererpyre.shells.Repertoirpyre.shells.Scriptpyre.shells.Shellpyre.shells.Terminalpyre.shells.Userpyre.shells.Web
Package Contents¶
-
class
pyre.shells.foundry(factory, implements=None, tip='', **kwds)¶ A decorator for callables that return component classes
-
pyre_tip=¶
-
pyre_factory¶
-
pyre_implements¶
-
__call__(self, *args, **kwds)¶
-
-
class
pyre.shells.action¶ Bases:
pyre.protocolA protocol that facilitates application extensibility: components that implement {Action} can be invoked from the command line
-
main(self, *kwds)¶ This is the implementation of the action
-
help(self, **kwds)¶ Provide help with invoking this action
-
-
pyre.shells.command()¶ The command base component
-
pyre.shells.panel()¶ The command panel base component
-
class
pyre.shells.shell¶ Bases:
pyre.protocolThe protocol implemented by the pyre application hosting strategies
-
home¶
-
doc= the process home directory¶
-
hosts¶
-
doc= the number of hosts in the parallel machine
-
tasks¶
-
doc= the number of tasks per host
-
gpus¶
-
doc= the number of GPU coprocessors per task
-
model¶
-
doc= the programming model
-
launch(self, application, *args, **kwds)¶ Launch the application
-
-
pyre.shells.script()¶ The basic application shell
-
pyre.shells.interactive()¶ An application shell based on {script} that enters interactive mode after the application is finished running
-
pyre.shells.ipython()¶ An application shell based on {script} that enters interactive mode after the application is finished running
-
pyre.shells.fork()¶ The fork shell: a shell that invokes the application main entry point in a child process
-
pyre.shells.daemon()¶ The daemon shell: a shell that invokes the application main entry point as long lived independent process that has detached completely from its parent
-
pyre.shells.web()¶ The web shell: an interactive shell that presents the user with an initial web page
-
class
pyre.shells.terminal¶ Bases:
pyre.protocolAn abstraction for the capabilities of user terminals
-
ansi¶
-
-
pyre.shells.ansi()¶ A terminal that supports color control using ANSI escpae sequences
-
pyre.shells.plain()¶ A plain terminal with no special capabilities
-
class
pyre.shells.application(name=None, **kwds)¶ Bases:
pyre.componentAbstract base class for top-level application components
{Application} streamlines the interaction with the pyre framework. It is responsible for staging an application process, i.e. establishing the process namespace and virtual filesystem, configuring the help system, and supplying the main behavior.
-
USER= user¶
-
SYSTEM= system¶
-
DEFAULTS= defaults¶
-
pyre_namespace¶
-
shell¶
-
doc= my hosting strategy¶
-
DEBUG¶
-
doc= debugging mode
-
pyre_home¶
-
pyre_prefix¶
-
pyre_defaults¶
-
pfs¶
-
layout¶
-
pyre_renderer¶
-
info¶
-
warning¶
-
error¶
-
debug¶
-
firewall¶
-
main(self, *args, **kwds)¶ The main entry point of an application component
-
launched(self, *args, **kwds)¶ Notification issued by some shells that application launching is complete
-
help(self, **kwds)¶ Hook for the application help system
-
run(self, *args, **kwds)¶ Ask my shell to launch me
-
pyre_loadLayout(self)¶ Create my application layout object, typically a subclass of {pyre.shells.Layout}
-
pyre_explore(self)¶ Look around my runtime environment and the filesystem for my special folders
-
pyre_mountPrivateFilespace(self)¶ Build the private filesystem
-
pyre_mountApplicationFolders(self, pfs, prefix)¶ Explore the application installation folders and construct my private filespace
-
pyre_mountPrivateFolder(self, pfs, prefix, folder)¶ Look in {prefix} for {folder}, create it if necessary, and mount it within {pfs}, my private filespace
-
pyre_resolveDependencies(self)¶ Go through my list of required package categories and resolve them
The result is a map from package categories to package instances that satisfy each requirement. This map includes dependencies induced while trying to satisfy my requirements
-
pyre_shutdown(self, **kwds)¶ Release all resources and prepare to exit
-
pyre_interrupted(self, **kwds)¶ The user issued a keyboard interrupt
-
pyre_interactiveSessionContext(self, context)¶ Prepare the interactive context by granting access to application parts
-
pyre_interactiveBanner(self)¶ Print an identifying message for the interactive session
-
pyre_help(self, indent=' ' * 4, **kwds)¶ Hook for the application help system
Print an identifying message for the help system
-
pyre_respond(self, server, request)¶ Fulfill a request from an HTTP {server}
-
-
class
pyre.shells.plexus(**kwds)¶ Bases:
pyre.shells.Application.ApplicationBase class for applications that interpret their first non-configurational command line argument as an action that should be executed.
As an example of such an app, consider {merlin}. Invoking
merlin versioncauses the {merlin} plexus to locate an action named {version} and invoke it.
Subclasses are expected to declare a class variable {pyre_action} that points to a subclass of the {Action} protocol defined in this package. This responsibility is left to subclasses so that there is no bias on the category names of the actions induced by a choice of family name by the framework. This way the language used to specify the actions and their behavior can remain natural to the context of the application.
-
pyre_repertoir¶
-
main(self, *args, **kwds)¶ The plexus main entry point interprets the first non-configurational command line argument as the name of an action to perform
-
help(self, **kwds)¶ Hook for the application help system
-
pyre_newRepertoir(self)¶ Factory for the manager of actions
-
pyre_invoke(self, action, argv)¶ Invoke the named {action} with {argv} as additional arguments
-
pyre_documentActions(self, indent=' ' * 4)¶ Place information about the available actions in my {info} channel
-
-
class
pyre.shells.layout¶ Bases:
pyre.componentA collection of configuration options that define the deployment layout of a pyre application
-
project¶
-
doc= the nickname of this application deployment¶
-
etc¶
-
doc= the location of application auxiliary data
-
var¶
-
doc= the location of files that support the application runtime environment
-
-
class
pyre.shells.user¶ Bases:
pyre.componentEncapsulation of user specific information
-
name¶
-
doc= the full name of the user¶
-
email¶
-
doc= the email address of the user
-
affiliation¶
-
doc= the affiliation of the user
-
externals¶
-
doc= the database of preferred instances for each external package category
-
uid¶
-
home¶
-
username¶
-