# HG changeset patch
# User William Stein <wstein@gmail.com>
# Date 1215374836 25200
# Node ID 0d52939bacf69f11c30761d0e8468de7d9685b33
# Parent  807f42bb62cdda3cfd7d7c38d0e51f51ee33797e
trac #3568 -- optimize startup of sage -- don't import web2 by default (in fact; none of the serious notebook servers stuff)

diff -r 807f42bb62cd -r 0d52939bacf6 sage/server/notebook/notebook_object.py
--- a/sage/server/notebook/notebook_object.py	Sun Jul 06 12:48:32 2008 -0700
+++ b/sage/server/notebook/notebook_object.py	Sun Jul 06 13:07:16 2008 -0700
@@ -15,8 +15,6 @@ This is used for configuring and startin
 """
 
 import time, os, shutil, signal, tempfile
-
-import notebook as _notebook
 
 import run_notebook
 
@@ -182,6 +180,7 @@ def test_notebook(admin_passwd, secure=F
     if not os.path.exists(directory):
         os.makedirs(directory)
 
+    import notebook as _notebook
     nb = _notebook.load_notebook(directory)
     nb.set_accounts(True)
     nb.add_user('admin', admin_passwd, '')
diff -r 807f42bb62cd -r 0d52939bacf6 sage/server/notebook/run_notebook.py
--- a/sage/server/notebook/run_notebook.py	Sun Jul 06 12:48:32 2008 -0700
+++ b/sage/server/notebook/run_notebook.py	Sun Jul 06 13:07:16 2008 -0700
@@ -19,11 +19,9 @@ import getpass
 # This actually serves up the notebook.
 ##########################################################
 
-from sage.misc.misc import DOT_SAGE
+from   sage.misc.misc import DOT_SAGE
 from   sage.server.misc import print_open_msg, find_next_available_port
 import os, shutil, socket, pexpect
-
-import notebook
 
 conf_path       = os.path.join(DOT_SAGE, 'notebook')
 
@@ -90,6 +88,7 @@ def notebook_twisted(self,
         print "your account. Make sure you know what you are doing."
         print '*'*70
 
+    import notebook
     nb = notebook.load_notebook(directory)
 
     nb.conf()['idle_timeout'] = int(timeout)
