Skip to content

Commit 36d70ce

Browse files
committed
merge
2 parents 4c50abd + aba405e commit 36d70ce

File tree

6 files changed

+15
-38
lines changed

6 files changed

+15
-38
lines changed

src/sage/server/notebook/cell.py

-3
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,6 @@ def set_changed_input_text(self, new_text):
275275

276276
def set_output_text(self, output, html, sage=None):
277277
output = output.replace('\r','')
278-
i = output.find(worksheet.SAGE_VARS)
279-
if i != -1:
280-
output = output[:i]
281278
if len(output) > MAX_OUTPUT:
282279
if not self.computing():
283280
file = "%s/full_output.txt"%self.directory()

src/sage/server/notebook/css.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,8 @@ def css(color='default'):
893893
font-size:12pt;
894894
font-family:arial, monospace;
895895
color:#bbbbbb;
896-
background-color: #cccccc;
896+
border-left:4px solid #aaffaa;
897+
/* background-color: #eeeeee; */
897898
text-align:left;
898899
}
899900

src/sage/server/notebook/js.py

-7
Original file line numberDiff line numberDiff line change
@@ -1524,11 +1524,6 @@ def notebook_lib():
15241524
return false;
15251525
}
15261526
1527-
function set_variable_list(variables) {
1528-
var varlist = get_element('variable_list');
1529-
varlist.innerHTML = variables;
1530-
}
1531-
15321527
function set_object_list(objects) {
15331528
var objlist = get_element('object_list');
15341529
objlist.innerHTML = objects;
@@ -1633,7 +1628,6 @@ def notebook_lib():
16331628
set_input_text(id, new_cell_input);
16341629
}
16351630
1636-
set_variable_list(variable_list);
16371631
set_object_list(object_list);
16381632
set_attached_files_list(attached_files_list);
16391633
}
@@ -1940,7 +1934,6 @@ def notebook_lib():
19401934
var link = get_element("restart_sage");
19411935
link.className = "restart_sage";
19421936
link.innerHTML = "Restart";
1943-
set_variable_list('');
19441937
sync_active_cell_list();
19451938
}
19461939

src/sage/server/notebook/notebook.py

+12-8
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def object_list_html(self):
617617
s = []
618618
a = '<a href="/%s.sobj" class="object_name">\n'
619619
for name in self.objects():
620-
s.append(a%name + name + '&nbsp;'*(m-len(name)) + '</a>\n')
620+
s.append(a%name + name + '</a>\n') # '&nbsp;'*(m-len(name)) +
621621
return '<br>\n'.join(s)
622622

623623
def defaults(self):
@@ -1054,12 +1054,14 @@ def _html_body(self, worksheet_id, show_debug=False, worksheet_authorized=False)
10541054
body += ' <span class="plusminus" id="object_list_hider">[-]</span>'
10551055
body += ' Saved Objects</div>\n'
10561056
body += ' <div class="object_list" id="object_list">%s</div>\n'%self.object_list_html()
1057-
body += '<div class="fivepix"></div>\n'
1058-
body += ' <div class="variables_topbar" onClick="toggle_menu(\'variable_list\');">'
1059-
body += ' <span class="plusminus" id="variable_list_hider">[-]</span>'
1060-
body += ' Variables</div>\n'
1061-
body += ' <div class="variable_list" id="variable_list">%s</div>\n'%\
1062-
worksheet.variables_html()
1057+
1058+
#body += '<div class="fivepix"></div>\n'
1059+
#body += ' <div class="variables_topbar" onClick="toggle_menu(\'variable_list\');">'
1060+
#body += ' <span class="plusminus" id="variable_list_hider">[-]</span>'
1061+
#body += ' Variables</div>\n'
1062+
#body += ' <div class="variable_list" id="variable_list">%s</div>\n'%\
1063+
# worksheet.variables_html()
1064+
10631065
body += '<div class="fivepix"></div>\n'
10641066
body += ' <div class="attached_topbar" onClick="toggle_menu(\'attached_list\');">'
10651067
body += ' <span class="plusminus" id="attached_list_hider">[-]</span>'
@@ -1443,7 +1445,9 @@ def format_completions_as_html(self, cell_id, completions):
14431445
onMouseOver='this.focus(); select_replacement(%s,%s);'
14441446
>%s</a>
14451447
</li>"""%(cell_id, i, j, cell_id, row[j], i,j,
1446-
row[j] + '&nbsp;'*(column_width[j]-len(row[j])) )
1448+
row[j])
1449+
#row[j] + '&nbsp;'*(column_width[j]-len(row[j])) )
1450+
14471451
lists[j].append(cell)
14481452

14491453
grid = "<ul class='completion_menu_one'>"

src/sage/server/notebook/server.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,7 @@ def cell_update(self):
344344
continously request the evaluation of this function
345345
to serve two purposes:
346346
1) To see if the long calculation is done, or
347-
2) To interupt the long running calculation.
348-
347+
2) To interrupt the long running calculation.
349348
"""
350349
C = self.get_postvars()
351350
worksheet_id = C['worksheet_id']

src/sage/server/notebook/worksheet.py

-17
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
SAGE_BEGIN=SC+'b'
4848
SAGE_END=SC+'e'
4949
SAGE_ERROR=SC+'r'
50-
SAGE_VARS=SC+'v'
5150

5251

5352
_a_sage = None
@@ -61,7 +60,6 @@ def init_sage_prestart():
6160
cmd = 'from sage.all import *;'
6261
cmd += 'from sage.all_notebook import *;'
6362
cmd += 'import sage.server.support as _support_; '
64-
#cmd += '__SAGENB__globals = set(globals().keys()); ' # only needed for SAGE_VAR functionality
6563
E.sendline(cmd)
6664

6765
def one_prestarted_sage():
@@ -577,11 +575,6 @@ def start_next_comp(self):
577575
if C.time() and not C.introspect():
578576
input += 'print "CPU time: %.2f s, Wall time: %.2f s"%(cputime(__SAGE_t__), walltime(__SAGE_w__))\n'
579577

580-
## TODO: Disabled since it isn't working anyways, and it
581-
## should be off if left panel is disabled.
582-
## If this is enabled, also enable SAGENB__globals at the top of this file.
583-
#if not C.introspect():
584-
# input += 'print "\\n\\n%s'%SAGE_VARS + '=%s"%_support_.variables(True)'
585578

586579
input = self.synchronize(input)
587580
# Unfortunately, this has to go here at the beginning of the file until Python 2.6,
@@ -738,16 +731,6 @@ def _process_output(self, s):
738731
i = s.rfind('>>>')
739732
if i >= 0:
740733
return s[:i-1]
741-
else:
742-
i = s.rfind(SAGE_VARS)
743-
if i != -1:
744-
t = s[i+len(SAGE_VARS)+1:]
745-
t = t.replace("<type '","").replace("<class '","").replace("'>","")
746-
try:
747-
self.__variables = eval(t)
748-
except:
749-
self.__variables = []
750-
s = s[:i-1]
751734
return s
752735

753736
def is_last_id_and_previous_is_nonempty(self, id):

0 commit comments

Comments
 (0)