Changeset 5087:5b845e53934a
- Timestamp:
- 06/21/07 09:40:43 (6 years ago)
- Branch:
- default
- Location:
- sage/server/notebook
- Files:
-
- 2 edited
-
notebook.py (modified) (3 diffs)
-
run_notebook.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/server/notebook/notebook.py
r5086 r5087 11 11 12 12 import os 13 import random 13 14 import re 14 15 import shutil … … 77 78 def default_users(self): 78 79 self.add_user('pub', '', '', account_type='guest') 79 self.add_user('guest', 'a', '', account_type='guest') 80 self.add_user('guest2', 'a', '', account_type='guest') 81 self.add_user('admin', 'a', '', account_type='admin') 82 self.add_user("a", "a", "", "admin") 83 self.add_user("b", "a", "", "user") 84 for n in range(20): 85 self.add_user("s%s"%n, "a", "", "user") 80 self.add_user('guest', '', '', account_type='guest') 81 pw = hex(random.randint(1,2**24))[2:] 82 self.add_user('admin', pw, '', account_type='admin') 83 print "*"*60 84 print "*"*60 85 print "" 86 print "Setting Admin password to '%s'"%pw 87 print "" 88 print "*"*60 89 print "*"*60 86 90 87 91 def users(self): … … 1194 1198 F = os.path.abspath(filename) 1195 1199 1196 print "Saving notebook to '%s'..."%F1200 #print "Saving notebook to '%s'..."%F 1197 1201 D, _ = os.path.split(F) 1198 1202 if not os.path.exists(D): -
sage/server/notebook/run_notebook.py
r5086 r5087 44 44 ulimit = None): 45 45 r""" 46 Experimental twisted version of the SAGE Notebook.46 The SAGE Notebook. 47 47 48 48 INPUT: … … 57 57 between web browsers and the SAGE notebook is 58 58 encrypted (via GNU TLS). 59 ADVANCED OPTIONS: 59 60 The recommended somewhat secure way to run the SAGE notebook 61 publically is to (1) use a chroot jail, and (2) a command like 62 63 notebook(secure=True, server_pool=['sage1@localhost'], ulimit='-v 1000000') 64 65 The secure=True option will use ssl for securing all 66 communications, the server pool option will ensure that the sage 67 worksheet process (where the users can execute arbitrary code) are 68 run as a separate process, and ulimit option ensures that no user 69 uses more than 1GB RAM per process. 70 71 INPUT: (more advanced) 60 72 server_pool -- (default: None), if given, should be a list like 61 73 ['sage1@localhost', 'sage2@localhost'], where
Note: See TracChangeset
for help on using the changeset viewer.
