ConsoleUser

Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com

This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.

All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.

class UserApp.UserApp(system, config, factory, atype=None)

I am the abstract parent of all the <no title> sides of the _Bridge pattern implementations for the applications a _User knows how to use

Parameters:

  • system: a <no title> object to communicate with the target system

  • config: a <no title> object holding all our configuration

  • factory: a function that will produce the instance of the other side of the _Bridge

  • atype: optionally the (string) name of the type of client to create, overriding anything in the config object

Print()

Print the current focus area (e.g., the window or document) to the default printer.

cleanup()

Make sure this app is closed and left no artifacts

It seems all apps have links in them these days, so try to find one and click it.

exit(save=False)

Exit the application.

Parameters:

  • save: whether or not to save drafts of any open messages

is_on_top(claim=False)

Sometimes another app might open a window of ours, this will check whether the currently on-top window seems to belong to this _impl’s instance.

Parameters:

  • claim: if True set the _impl to treat that window as its main window

is_ready()

Return whether or not the application is currently open and available.

open()

Try to open the client, which should launch the application if there is not one, and may or may not if there is already an open

passive_is_open()

Without disturbing the system, check whether there is a reasonable chance that the application is open.