mailr15538 - /1.3/status.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on March 19, 2012 - 10:26:
Author: bugman
Date: Mon Mar 19 10:26:10 2012
New Revision: 15538

URL: http://svn.gna.org/viewcvs/relax?rev=15538&view=rev
Log:
The Status singleton text_width variable has been introduced for text 
wrapping.

This is for better support on Windows, and possibly in the future adapting to 
the terminal width.


Modified:
    1.3/status.py

Modified: 1.3/status.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/status.py?rev=15538&r1=15537&r2=15538&view=diff
==============================================================================
--- 1.3/status.py (original)
+++ 1.3/status.py Mon Mar 19 10:26:10 2012
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2010-2011 Edward d'Auvergne                                  
 #
+# Copyright (C) 2010-2012 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -24,6 +24,7 @@
 """Module containing the status singleton object."""
 
 # Python module imports.
+import platform
 from Queue import Queue
 from re import search
 import sys
@@ -90,6 +91,12 @@
         # Set up the observer objects.
         self._setup_observers()
 
+        # Text wrapping on different operating systems.
+        if platform.uname()[0] in ['Windows', 'Microsoft']:
+            self.text_width = 80
+        else:
+            self.text_width = 100
+
 
     def _setup_observers(self):
         """Set up all the observer objects."""




Related Messages


Powered by MHonArc, Updated Mon Mar 19 10:40:02 2012