Package x2go :: Package backends :: Package info :: Module plain :: Class X2GoServerSessionList
[frames] | no frames]

Class X2GoServerSessionList

source code

object --+
         |
        X2GoServerSessionList

X2GoServerSessionList is used to store all information that is retrieved from a connected X2Go server on a X2GoControlSession.list_sessions() call.

Instance Methods
 
__init__(self, x2go_output=None, info_backend=<class 'x2go.backends.info.plain.X2GoServerSessionInfo'>)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__call__(self) source code
 
set_sessions(self, sessions)
Set the sessions property directly by parsing a complete data structure.
source code
X2GoServerSessionInfo* or None
get_session_info(self, session_name)
Retrieve the session information for <session_name>.
source code
 
get_session_with(self, property_name, value, hostname=None)
Find session with a given display number on a given host.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, x2go_output=None, info_backend=<class 'x2go.backends.info.plain.X2GoServerSessionInfo'>)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • x2go_output (str) - X2Go server's x2golistsessions command output, each session separated by a newline character. Session values are separated by Unix Pipe Symbols ('|')
  • info_backend (X2GoServerSessionInfo*) - the session info backend to use
Overrides: object.__init__

get_session_info(self, session_name)

source code 

Retrieve the session information for <session_name>.

Parameters:
  • session_name (str) - the queried session name
Returns: X2GoServerSessionInfo* or None
the session info of <session_name>

get_session_with(self, property_name, value, hostname=None)

source code 

Find session with a given display number on a given host.

Parameters:
  • property_name (str) - match a session based on this property name
  • value (str) - the resulting session has to match this value for <property_name>
  • hostname (str) - the result has to match this hostname