mailr4911 - /1.3/generic_fns/molmol.py


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

Header


Content

Posted by edward on February 07, 2008 - 10:36:
Author: bugman
Date: Thu Feb  7 10:33:14 2008
New Revision: 4911

URL: http://svn.gna.org/viewcvs/relax?rev=4911&view=rev
Log:
Converted the Molmol 'command_history' structure into a module variable.


Modified:
    1.3/generic_fns/molmol.py

Modified: 1.3/generic_fns/molmol.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/molmol.py?rev=4911&r1=4910&r2=4911&view=diff
==============================================================================
--- 1.3/generic_fns/molmol.py (original)
+++ 1.3/generic_fns/molmol.py Thu Feb  7 10:33:14 2008
@@ -29,6 +29,8 @@
 from relax_errors import RelaxError, RelaxNoPipeError, RelaxNoSequenceError
 
 
+command_history = ""
+"""Variable for storing the Molmol command history."""
 
 
 
@@ -38,14 +40,11 @@
 
         self.relax = relax
 
-        # Initialise the command history (for reopening Molmol pipes).
-        self.clear_history()
-
 
     def clear_history(self):
         """Function for clearing the Molmol command history."""
 
-        self.command_history = ""
+        command_history = ""
 
 
     def command(self, run, command):
@@ -130,8 +129,8 @@
         relax_data_store.molmol = popen("molmol -f -", 'w', 0)
 
         # Execute the command history.
-        if len(self.command_history) > 0:
-            self.pipe_write(self.command_history, store_command=0)
+        if len(command_history) > 0:
+            self.pipe_write(command_history, store_command=0)
             return
 
         # Test if the PDB file has been loaded.
@@ -175,7 +174,7 @@
 
         # Place the command in the command history.
         if store_command:
-            self.command_history = self.command_history + command + "\n"
+            command_history = command_history + command + "\n"
 
 
     def ribbon(self, run=None):




Related Messages


Powered by MHonArc, Updated Thu Feb 07 11:20:06 2008