OrsSessionManager

Manages creating and saving sessions

author:

Dragonfly Team

contact:

https://dragonfly.comet.tech

email:

support.dragonfly@comet.tech

organization:

Comet Technologies Canada Inc.

address:

460 Ste-Catherine Ouest, suite 600, Montréal, Québec, Canada, H3B 1A7

copyright:

Comet Technologies Canada Inc. All rights reserved 2023.

date:

Oct 26 2015 08:12

dragonflyVersion:

3.1.0.286 (D)

UUID:

334d0352761a11e7a9cd448a5b5d70c0

Class Code

class OrsPythonPlugins.OrsSessionManager.OrsSessionManager.OrsSessionManager(*args, **kwargs)
classmethod getSessionHasData()

Checks to see if session current has data (thus does it require a New Session?) :return: True if live data exists, False otherwise. :rtype: bool

interfacemethod loadSessionFromFile(fileName: str, startup: bool = False) None

Load a session from file

Parameters:
  • fileName (file) –

  • startup (bool) – if True it means it’s early on and the event mechanism is still not up, so we need to do it now

classmethod saveSessionInteractive(askUserForFile=True)

Starts the process of saving a session, and interacts with the user

Parameters:

askUserForFile (bool) – True to ask the user where to save (Save As), False to just save to current file (will act as Save As if no current file).

interfacemethod saveSessionToFile(fileName: str, progress: Progress, compressionEngine: int = 0) int

Save session in file

Parameters:
  • fileName (file saving) –

  • progress (ORSModel.ors.Progress) –

  • compressionEngine (int) – compressionEngine for export file

Anonymize fileName:

True

Returns:

output (int) – success

classmethod startNewSessionInteractive()

Starts a new session, but if no objects live in the current session then just bypass

Returns:

output – None