]> granicus.if.org Git - python/commitdiff
Fixed running of standalone via command line. Also, only do save from
authorBarry Warsaw <barry@python.org>
Thu, 22 Oct 1998 18:45:52 +0000 (18:45 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 22 Oct 1998 18:45:52 +0000 (18:45 +0000)
main() so that run-as-modal doesn't automatically save database.

Tools/pynche/Main.py

index f266a8d184fec2e0ebca3c1a66e31a0b6e5b0bfc..d6dbcb1f8c7cba5d44b19001ce5d2433da4aa13f 100644 (file)
@@ -149,8 +149,6 @@ def run(app, s):
        app.start()
     except KeyboardInterrupt:
        pass
-    # save the option database
-    s.save_views()
 
 
 \f
@@ -182,7 +180,11 @@ def main():
         elif opt in ('-i', '--initfile'):
             initfile = arg
 
-    run()
+    app, sb = build(initialcolor=initialcolor,
+                    initfile=initfile,
+                    ignore=ignore)
+    run(app, sb)
+    sb.save_views()
 
 \f
 if __name__ == '__main__':