| Trees | Indices | Help |
|
|---|
|
|
1 ###############################################################################
2 # #
3 # Copyright (C) 2012 Edward d'Auvergne #
4 # #
5 # This file is part of the program relax. #
6 # #
7 # relax 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 2 of the License, or #
10 # (at your option) any later version. #
11 # #
12 # relax 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 relax; if not, write to the Free Software #
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
20 # #
21 ###############################################################################
22
23 # Module docstring.
24 """The script user function definitions."""
25
26 # Python module imports.
27 import wx
28
29 # relax module imports.
30 from generic_fns import script
31 from graphics import WIZARD_IMAGE_PATH
32 from user_functions.data import Uf_info; uf_info = Uf_info()
33 from user_functions.objects import Desc_container
34
35
36 # The script user function.
37 uf = uf_info.add_uf('script')
38 uf.title = "Execute a relax script."
39 uf.title_short = "Script execution."
40 uf.add_keyarg(
41 name = "file",
42 py_type = "str",
43 arg_type = "file sel",
44 desc_short = "file name",
45 desc = "The name of the file containing the relaxation data.",
46 wiz_filesel_wildcard = "relax scripts (*.py)|*.py",
47 wiz_filesel_style = wx.FD_OPEN
48 )
49 uf.add_keyarg(
50 name = "dir",
51 py_type = "str",
52 arg_type = "dir",
53 desc_short = "directory name",
54 desc = "The directory where the file is located.",
55 can_be_none = True
56 )
57 # Description.
58 uf.desc.append(Desc_container())
59 uf.desc[-1].add_paragraph("This will execute a relax or any ordinary Python script.")
60 uf.backend = script.script
61 uf.menu_text = "&script"
62 uf.gui_icon = "oxygen.mimetypes.application-x-desktop"
63 uf.wizard_size = (700, 400)
64
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Apr 10 14:16:54 2013 | http://epydoc.sourceforge.net |