mailr16304 - /branches/uf_redesign/user_functions/script.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on May 13, 2012 - 19:14:
Author: bugman
Date: Sun May 13 19:14:49 2012
New Revision: 16304

URL: http://svn.gna.org/viewcvs/relax?rev=16304&view=rev
Log:
Added the user_functions.script module which should have been committed in 
r16303.


Added:
    branches/uf_redesign/user_functions/script.py

Added: branches/uf_redesign/user_functions/script.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/user_functions/script.py?rev=16304&view=auto
==============================================================================
--- branches/uf_redesign/user_functions/script.py (added)
+++ branches/uf_redesign/user_functions/script.py Sun May 13 19:14:49 2012
@@ -1,0 +1,56 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2012 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax.                                    
 #
+#                                                                            
 #
+# relax is free software; you can redistribute it and/or modify              
 #
+# it under the terms of the GNU General Public License as published by       
 #
+# the Free Software Foundation; either version 2 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# relax is distributed in the hope that it will be useful,                   
 #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of             
 #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              
 #
+# GNU General Public License for more details.                               
 #
+#                                                                            
 #
+# You should have received a copy of the GNU General Public License          
 #
+# along with relax; if not, write to the Free Software                       
 #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
+#                                                                            
 #
+###############################################################################
+
+# Module docstring.
+"""The script user function definitions."""
+
+# relax module imports.
+from generic_fns import script
+from graphics import WIZARD_IMAGE_PATH
+from user_functions.data import Uf_info; uf_info = Uf_info()
+
+# The script user function.
+uf = uf_info.add_uf('script')
+uf.title = "Execute a relax script."
+uf.title_short = "Script execution."
+uf.add_keyarg(
+    name = "file",
+    py_type = "str",
+    arg_type = "file sel",
+    desc_short = "file name",
+    desc = "The name of the file containing the relaxation data."
+)
+uf.add_keyarg(
+    name = "dir",
+    py_type = "str",
+    arg_type = "dir",
+    desc_short = "directory name",
+    desc = "The directory where the file is located.",
+    can_be_none = True
+)
+uf.desc = """
+This will execute a relax or any ordinary Python script.
+"""
+uf.backend = script.script
+uf.menu_text = "&script"
+uf.gui_icon = "oxygen.mimetypes.application-x-desktop"
+uf.wizard_size = (700, 400)




Related Messages


Powered by MHonArc, Updated Wed May 16 10:40:03 2012