"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gui/input_elements/sequence_2D.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.

sequence_2D.py  (relax-4.1.3.src.tar.bz2):sequence_2D.py  (relax-5.0.0.src.tar.bz2)
skipping to change at line 30 skipping to change at line 30
############################################################################### ###############################################################################
# Module docstring. # Module docstring.
"""Module containing a set of special GUI elements to be used in the relax wizar ds.""" """Module containing a set of special GUI elements to be used in the relax wizar ds."""
# Python module imports. # Python module imports.
import wx import wx
import wx.lib.mixins.listctrl import wx.lib.mixins.listctrl
# relax module imports. # relax module imports.
import dep_check
from gui.input_elements.sequence import Sequence, Sequence_list_ctrl, Sequence_w indow from gui.input_elements.sequence import Sequence, Sequence_list_ctrl, Sequence_w indow
from gui.string_conv import int_to_gui from gui.string_conv import int_to_gui
from lib.check_types import is_list, is_list_of_lists from lib.check_types import is_list, is_list_of_lists
from status import Status; status = Status() from status import Status; status = Status()
class Sequence_2D(Sequence): class Sequence_2D(Sequence):
"""Wizard GUI element for the input of all types of 2D Python sequence objec ts. """Wizard GUI element for the input of all types of 2D Python sequence objec ts.
The supported Python types include: The supported Python types include:
- list of floats - list of floats
skipping to change at line 261 skipping to change at line 262
return return
# Loop over the entries. # Loop over the entries.
for i in range(len(values)): for i in range(len(values)):
# Incorrect dimensions. # Incorrect dimensions.
if self.dim[1] != None and len(values[i]) != self.dim[1]: if self.dim[1] != None and len(values[i]) != self.dim[1]:
continue continue
# Append a row for variable dimension sequences (the first element a lready exists). # Append a row for variable dimension sequences (the first element a lready exists).
if self.variable_length and i != 0: if self.variable_length and i != 0:
self.sequence.InsertStringItem(i, int_to_gui(i+1)) if dep_check.wx_classic:
self.sequence.InsertStringItem(i, int_to_gui(i+1))
else:
self.sequence.InsertItem(i, int_to_gui(i+1))
# Loop over the values. # Loop over the values.
for j in range(self.dim[1]): for j in range(self.dim[1]):
# Set the value. # Set the value.
self.sequence.SetStringItem(i, j+self.offset, self.convert_to_gu if dep_check.wx_classic:
i(values[i][j])) self.sequence.SetStringItem(i, j+self.offset, self.convert_t
o_gui(values[i][j]))
else:
self.sequence.SetItem(i, j+self.offset, self.convert_to_gui(
values[i][j]))
# Refresh. # Refresh.
self.Refresh() self.Refresh()
def add_list(self, sizer): def add_list(self, sizer):
"""Set up the list control. """Set up the list control.
@param sizer: A sizer object. @param sizer: A sizer object.
@type sizer: wx.Sizer instance @type sizer: wx.Sizer instance
""" """
 End of changes. 3 change blocks. 
3 lines changed or deleted 11 lines changed or added

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