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 SpreadsheetImpl.SpreadsheetImpl(system, config)¶
This is the abstract class which a <no title> interacts with to control a Spreadsheet (like MS Excel or OpenOffice.org Calc). Combined with an instance of SpreadsheetImpl these classes implement the Bridge Pattern
Parameters:
system: a <no title> object letting us control the remote system
config: a <no title> object containing the config information for this user
- close_sheet(save=False)¶
Close the currently open spreadhseet.
Parameters:
save: Whether or not to try saving the sheet on close
Return: True iff things seem to work correctly
- load_sheet(path)¶
Open an existing spreadsheet stored at the given path.
Parameters:
path: the path on the system being controlled to the desired spreadsheet
Return: True iff the spreadsheet seems to have opened
- open()¶
Open the application. Generally this will have a default, blank sheet.
- SpreadsheetImpl.get_spreadsheet(system, config, s_type=None)¶
I am the Factory method to create spreadsheets of the correct concrete subclass of SpreadsheetImpl.
Parameters:
system: The <no title> that is used to interact with the target
config: the <no title> object that defines this user
s_type: optionally the (string) type of spreadsheet to create, ignoring what it says in config
Return: a SpreadsheetImpl instance if a suitable type can be found, or None otherwise