Changeset 7480:bfdc4a04b179
- Timestamp:
- 12/01/07 10:01:39 (5 years ago)
- Branch:
- default
- Location:
- sage/server/notebook
- Files:
-
- 4 edited
-
all.py (modified) (1 diff)
-
notebook.py (modified) (1 diff)
-
notebook_object.py (modified) (2 diffs)
-
run_notebook.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/server/notebook/all.py
r6787 r7480 11 11 #from twist import notebook_twisted as notebook 12 12 13 from notebook_object import notebook 14 13 from notebook_object import notebook, inotebook 15 14 16 15 from sagetex import sagetex -
sage/server/notebook/notebook.py
r7253 r7480 44 44 class Notebook(SageObject): 45 45 def __init__(self, 46 dir ='sage_notebook',46 dir, 47 47 system=None, 48 48 show_debug = False, -
sage/server/notebook/notebook_object.py
r7313 r7480 22 22 23 23 INPUT: 24 directory -- (default: 'sage_notebook') directory that contains25 the SAGE notebook files24 directory -- directory that contains the SAGE notebook files; 25 The default is .sage/sage_notebook, in your home directory. 26 26 port -- (default: 8000), port to serve the notebook on 27 27 address -- (default: 'localhost'), address to listen on … … 141 141 142 142 notebook = NotebookObject() 143 144 145 def inotebook(*args, **kwds): 146 """ 147 Exactly the same as notebook(...) but with secure=False. 148 """ 149 kwds['secure'] = False 150 notebook(*args, **kwds) -
sage/server/notebook/run_notebook.py
r6787 r7480 43 43 44 44 def notebook_twisted(self, 45 directory = 'sage_notebook',45 directory = None, 46 46 port = 8000, 47 47 address = 'localhost', … … 60 60 sagetex_path = "", 61 61 start_path = ""): 62 if directory is None: 63 directory = '%s/sage_notebook'%DOT_SAGE 62 64 if not os.path.exists(directory): 63 65 os.makedirs(directory) 66 67 print "The notebook files are stored in:", directory 68 # First change to the directory that contains the notebook directory 69 wd = os.path.split(directory) 70 if wd[0]: os.chdir(wd[0]) 71 directory = wd[1] 72 73 64 74 port = int(port) 65 75 conf = '%s/twistedconf.tac'%directory … … 135 145 136 146 config = open(conf, 'w') 147 137 148 config.write(""" 138 149 #################################################################### 139 150 # WARNING -- Do not edit this file! It is autogenerated each time 140 151 # the notebook(...) command is executed. 141 #################################################################### 152 #################################################################### 153 154 # Now set things up and start the notebook 142 155 import sage.server.notebook.notebook 143 156 sage.server.notebook.notebook.JSMATH=True
Note: See TracChangeset
for help on using the changeset viewer.
