diff sqlpyPlus.py @ 27:ca6f34be3397

working on ed
author devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
date Wed, 19 Dec 2007 16:22:53 -0500
parents bb3fb24b6f5f
children d3b2f9c6e536
line wrap: on
line diff
--- a/sqlpyPlus.py	Wed Dec 19 16:10:01 2007 -0500
+++ b/sqlpyPlus.py	Wed Dec 19 16:22:53 2007 -0500
@@ -695,19 +695,6 @@
         self.onecmd_plus_hooks(runme)
     do_r = do_run
 
-    def do_ed(self, arg):
-        'ed [N]: brings up SQL from N commands ago in text editor, and puts result in SQL buffer.'
-        fname = 'sqlpython_temp.sql'
-        buffer = self.last_matching(arg)
-        if not buffer:
-            print 'Nothing appropriate in buffer to edit.'
-            return
-        f = open(fname, 'w')
-        f.write(buffer)
-        f.close()
-        editSearcher.invoke(fname)
-        self.load(fname)
-    do_edit = do_ed
     def do_get(self, fname):
         'Brings SQL commands from a file to the in-memory SQL buffer.'
         numCommandsLoaded = self.load(fname)
@@ -747,14 +734,6 @@
             self.onecmd('q')
         except KeyError:
             print 'psql command \%s not yet supported.' % abbrev        
-    def do_save(self, fname):
-        'save FILENAME: Saves most recent SQL command to disk.'
-        try:
-            f = open(fname, 'w')
-            f.write(self.sqlBuffer[-1])
-            f.close()
-        except Exception, e:
-            print 'Error saving %s: %s' % (fname, str(e))
         
     def do_print(self, arg):
         'print VARNAME: Show current value of bind variable VARNAME.'