[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.0.44.2-9-g565d53c

X2Go dev team git-admin at x2go.org
Wed Jan 8 15:26:23 CET 2014


The branch, build-baikal has been updated
       via  565d53c772448646f065bca08f3ab0b96cab1a30 (commit)
      from  f1d83c291a5145e447573c592428ba5b9ec4d22d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 x2go/xserver.py |   61 ++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 49 insertions(+), 12 deletions(-)

The diff of changes is:
diff --git a/x2go/xserver.py b/x2go/xserver.py
index 76bba0e..0f8e1bb 100644
--- a/x2go/xserver.py
+++ b/x2go/xserver.py
@@ -63,10 +63,20 @@ class X2goClientXConfig(inifiles.X2goIniFile):
             /etc/x2goclient/xconfig
             ~/.x2goclient/xconfig
 
-        The files are read in the specified order and config options of both files are merged. Options 
+        The files are read in the specified order and config options of both files are merged. Options
         set in the user configuration file (C{~/.x2goclient/xconfig}) override global options set in
         C{/etc/x2goclient/xconfig}.
 
+        @param config_files: a list of configuration file names
+        @type config_files: C{list}
+        @param defaults: a Python dictionary with configuration file defaults (use on your own risk)
+        @type defaults: C{dict}
+        @param logger: you can pass an L{X2goLogger} object to the L{X2goClientXConfig} constructor
+        @type logger: C{instance}
+        @param loglevel: if no L{X2goLogger} object has been supplied a new one will be
+            constructed with the given loglevel
+        @type loglevel: C{int}
+
         """
         if _X2GOCLIENT_OS not in ("Windows"):
             import exceptions
@@ -76,6 +86,16 @@ class X2goClientXConfig(inifiles.X2goIniFile):
         inifiles.X2goIniFile.__init__(self, config_files, defaults=defaults, logger=logger, loglevel=loglevel)
 
     def get_xserver_config(self, xserver_name):
+        """\
+        Retrieve the XServer configuration (from the xconfig file) for the given XServer application.
+
+        @param xserver_name: name of the XServer application
+        @type xserver_name: C{str}
+
+        @return: A Python dictionary containing the XServer's configuration settings
+        @rtype: C{list}
+
+        """
         _xserver_config = {}
         for option in self.iniConfig.options(xserver_name):
             _xserver_config[option] = self.get(xserver_name, option, key_type=self.get_type(xserver_name, option))
@@ -84,7 +104,7 @@ class X2goClientXConfig(inifiles.X2goIniFile):
     @property
     def known_xservers(self):
         """\
-        STILL UNDOCUMENTED
+        Renders a list of XServers that are known to Python X2go.
 
         """
         return self.get_value('XServers', 'known_xservers')
@@ -92,7 +112,8 @@ class X2goClientXConfig(inifiles.X2goIniFile):
     @property
     def installed_xservers(self):
         """\
-        STILL UNDOCUMENTED
+        Among the known XServers renders a list of XServers that are actually
+        installed on the system.
 
         """
         _installed = []
@@ -104,7 +125,7 @@ class X2goClientXConfig(inifiles.X2goIniFile):
     @property
     def running_xservers(self):
         """\
-        STILL UNDOCUMENTED
+        Tries to render a list of running XServer processes from the system's process list.
 
         """
         _running = []
@@ -124,7 +145,8 @@ class X2goClientXConfig(inifiles.X2goIniFile):
     @property
     def xserver_launch_possible(self):
         """\
-        STILL UNDOCUMENTED
+        Detect if there is an XServer (that is known to Python X2go) installed on the system.
+        Equals C{true} if we have found an installed XServer that we can launch.
 
         """
         return bool(self.installed_xservers)
@@ -132,7 +154,9 @@ class X2goClientXConfig(inifiles.X2goIniFile):
     @property
     def xserver_launch_needed(self):
         """\
-        STILL UNDOCUMENTED
+        Detect if an XServer launch is really needed (or if we use an already running XServer instance).
+        Equals C{true} if we have to launch an XServer before we can start/resume
+        X2go sessions.
 
         """
         return not bool(self.running_xservers)
@@ -140,7 +164,7 @@ class X2goClientXConfig(inifiles.X2goIniFile):
     @property
     def preferred_xserver(self):
         """\
-        STILL UNDOCUMENTED
+        Renders a list of preferred XServer names (most preferred on top).
 
         """
         if self.xserver_launch_possible and self.xserver_launch_needed:
@@ -151,13 +175,26 @@ class X2goClientXConfig(inifiles.X2goIniFile):
 
 class X2goXServer(threading.Thread):
     """
-    This routine will start an XServer if it is not running 
-    already
+    This class is responsible for starting/stopping an external XServer application.
+
+    X2go applications require a running XServer on the client system. This class will
+    manage/handle the XServer while your X2go application is running.
+
     """
 
     def __init__(self, xserver_name, xserver_config, logger=None, loglevel=log.loglevel_DEFAULT):
         """\
-        STILL UNDOCUMENTED
+        Initialize an XServer thread.
+
+        @param xserver_name: name of the XServer to start (refer to the xconfig file for available names)
+        @type xserver_name: C{str}
+        @param xserver_config: XServer configuration node (as derived from L{X2goClientXConfig.get_xserver_config()}
+        @type xserver_config: C{dict}
+        @param logger: you can pass an L{X2goLogger} object to the L{X2goClientXConfig} constructor
+        @type logger: C{instance}
+        @param loglevel: if no L{X2goLogger} object has been supplied a new one will be
+            constructed with the given loglevel
+        @type loglevel: C{int}
 
         """
         if _X2GOCLIENT_OS not in ("Windows"):
@@ -184,7 +221,7 @@ class X2goXServer(threading.Thread):
 
     def run(self):
         """\
-        STILL UNDOCUMENTED
+        Start this L{X2goXServer} thread. This will launch the configured XServer application.
 
         """
         self._keepalive = True
@@ -219,7 +256,7 @@ class X2goXServer(threading.Thread):
 
     def stop_thread(self):
         """\
-        STILL UNDOCUMENTED
+        A call to this method will stop the XServer application and do a cleanup afterwards.
 
         """
         self.logger('stop_thread() method has been called', loglevel=log.loglevel_DEBUG)


hooks/post-receive
-- 
python-x2go.git (Python X2Go Client API)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).




More information about the x2go-commits mailing list