Package prompt :: Module doc_string
[hide private]
[frames] | no frames]

Source Code for Module prompt.doc_string

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2005-2012 Edward d'Auvergne                                   # 
 4  #                                                                             # 
 5  # This file is part of the program relax (http://www.nmr-relax.com).          # 
 6  #                                                                             # 
 7  # This program is free software: you can redistribute it and/or modify        # 
 8  # it under the terms of the GNU General Public License as published by        # 
 9  # the Free Software Foundation, either version 3 of the License, or           # 
10  # (at your option) any later version.                                         # 
11  #                                                                             # 
12  # This program is distributed in the hope that it will be useful,             # 
13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
15  # GNU General Public License for more details.                                # 
16  #                                                                             # 
17  # You should have received a copy of the GNU General Public License           # 
18  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
19  #                                                                             # 
20  ############################################################################### 
21   
22  # Module docstring. 
23  """Module containing various shared docstrings.""" 
24   
25   
26  # relax module imports. 
27  from user_functions.objects import Desc_container 
28   
29   
30  # Regular expression. 
31  regexp_doc = Desc_container("Regular expression") 
32  regexp_doc.add_paragraph("The python function 'match', which uses regular expression, is used to determine which data type to set values to, therefore various data_type strings can be used to select the same data type.  Patterns used for matching for specific data types are listed below.") 
33  regexp_doc.add_paragraph("This is a short description of python regular expression, for more information see the regular expression syntax section of the Python Library Reference.  Some of the regular expression syntax used in this function is:") 
34  regexp_doc.add_item_list_element("'[]'", "A sequence or set of characters to match to a single character.  For example, '[sS]2' will match both 'S2' and 's2'.") 
35  regexp_doc.add_item_list_element("'^'", "Match the start of the string.") 
36  regexp_doc.add_item_list_element("'$'", "Match the end of the string.  For example, '^[Ss]2$' will match 's2' but not 'S2f' or 's2s'.") 
37  regexp_doc.add_item_list_element("'.'", "Match any character.") 
38  regexp_doc.add_item_list_element("'x*'", "Match the character 'x' any number of times, for example 'x' will match, as will 'xxxxx'.") 
39  regexp_doc.add_item_list_element("'.*'", "Match any sequence of characters of any length.") 
40  regexp_doc.add_paragraph("Importantly, do not supply a string for the data type containing regular expression.  The regular expression is implemented so that various strings can be supplied which all match the same data type.") 
41