"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "status.py" between
relax-4.1.3.src.tar.bz2 and relax-5.0.0.src.tar.bz2

About: relax allows the study of molecular dynamics through the analysis of experimental NMR data. Organic molecules, proteins, RNA, DNA, sugars, and other biomolecules are all supported.

status.py  (relax-4.1.3.src.tar.bz2):status.py  (relax-5.0.0.src.tar.bz2)
############################################################################### ###############################################################################
# # # #
# Copyright (C) 2010-2013 Edward d'Auvergne # # Copyright (C) 2010-2013,2019 Edward d'Auvergne #
# # # #
# This file is part of the program relax (http://www.nmr-relax.com). # # This file is part of the program relax (http://www.nmr-relax.com). #
# # # #
# This program is free software: you can redistribute it and/or modify # # This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by # # it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or # # the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. # # (at your option) any later version. #
# # # #
# This program is distributed in the hope that it will be useful, # # This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # but WITHOUT ANY WARRANTY; without even the implied warranty of #
skipping to change at line 26 skipping to change at line 26
# # # #
# You should have received a copy of the GNU General Public License # # You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. # # along with this program. If not, see <http://www.gnu.org/licenses/>. #
# # # #
############################################################################### ###############################################################################
# Module docstring. # Module docstring.
"""Module containing the status singleton object.""" """Module containing the status singleton object."""
# Python module imports. # Python module imports.
from os import F_OK, access, getcwd from os import F_OK, access, environ, getcwd
try:
from os import get_terminal_size # Only in Python >= 3.3.
except ImportError:
def get_terminal_size(i): return None
from os.path import sep from os.path import sep
import platform import platform
from re import search from re import search
import sys import sys
from time import time from time import time
from threading import Lock, RLock from threading import Lock, RLock
# relax module imports. # relax module imports.
from lib.compat import Queue from lib.compat import Queue
from lib.errors import RelaxError from lib.errors import RelaxError
skipping to change at line 135 skipping to change at line 139
# GUI structures. # GUI structures.
self.controller_max_entries = 100000 # Scroll back limit in the relax controller. self.controller_max_entries = 100000 # Scroll back limit in the relax controller.
# A structure for skipped system and unit tests. # A structure for skipped system and unit tests.
self.skipped_tests = [] self.skipped_tests = []
"""The skipped tests list. Each element should be a list of the test ca se name, the missing Python module, and the name of the test suite category (i.e . 'system' or 'unit').""" """The skipped tests list. Each element should be a list of the test ca se name, the missing Python module, and the name of the test suite category (i.e . 'system' or 'unit')."""
# Set up the observer objects. # Set up the observer objects.
self._setup_observers() self._setup_observers()
# Text wrapping on different operating systems. # Text wrapping widths on different operating systems.
if platform.uname()[0] in ['Windows', 'Microsoft']: self._set_text_width()
self.text_width = 79
else: def _set_text_width(self):
"""Define the text width for text formatting throughout relax.
The width will be based on that reported by the terminal, bracketed by a
n upper value of 100 characters. If the value cannot be determined, on MS Windo
ws it will be set to 79 characters to allow for the MS Windows cmd.exe prompt.
"""
# Determine the value from the terminal, checking all IO streams (for Py
thon >= 3.3).
size = None
self.text_width = None
for i in range(3):
try:
size = get_terminal_size(i)
except OSError:
continue
if size:
self.text_width = min(size[0], 100)
# Default fallback values.
if not self.text_width:
self.text_width = 100 self.text_width = 100
if platform.uname()[0] in ['Windows', 'Microsoft']:
self.text_width = 79
# Reset the COLUMNS environmental variable.
environ['COLUMNS'] = str(self.text_width)
def _setup_observers(self): def _setup_observers(self):
"""Set up all the observer objects.""" """Set up all the observer objects."""
# A container for all the observers. # A container for all the observers.
self.observers = Observer_container() self.observers = Observer_container()
# The observer object for status changes in the auto-analyses. # The observer object for status changes in the auto-analyses.
self.observers.auto_analyses = Observer('auto_analyses') self.observers.auto_analyses = Observer('auto_analyses')
 End of changes. 4 change blocks. 
6 lines changed or deleted 36 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)