Trees | Indices | Help |
|
---|
|
1 ############################################################################### 2 # # 3 # Copyright (C) 2012-2013 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 """The script user function definitions.""" 24 25 # Python module imports. 26 import dep_check 27 if dep_check.wx_module: 28 from wx import FD_OPEN 29 else: 30 FD_OPEN = -1 31 32 # relax module imports. 33 from pipe_control import script 34 from user_functions.data import Uf_info; uf_info = Uf_info() 35 from user_functions.objects import Desc_container 36 37 38 # The script user function. 39 uf = uf_info.add_uf('script') 40 uf.title = "Execute a relax script." 41 uf.title_short = "Script execution." 42 uf.add_keyarg( 43 name = "file", 44 py_type = "str", 45 arg_type = "file sel", 46 desc_short = "file name", 47 desc = "The name of the file containing the relaxation data.", 48 wiz_filesel_wildcard = "relax scripts (*.py)|*.py", 49 wiz_filesel_style = FD_OPEN 50 ) 51 uf.add_keyarg( 52 name = "dir", 53 py_type = "str", 54 arg_type = "dir", 55 desc_short = "directory name", 56 desc = "The directory where the file is located.", 57 can_be_none = True 58 ) 59 # Description. 60 uf.desc.append(Desc_container()) 61 uf.desc[-1].add_paragraph("This will execute a relax or any ordinary Python script.") 62 uf.backend = script.script 63 uf.menu_text = "&script" 64 uf.gui_icon = "oxygen.mimetypes.application-x-desktop" 65 uf.wizard_size = (700, 400) 66
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Mar 17 15:12:13 2014 | http://epydoc.sourceforge.net |