Commits

Ivan Andrus  committed b04fe36

Attempt to work around hang waiting for a prompt

  • Participants
  • Parent commits aef2bf2

Comments (0)

Files changed (2)

File emacs/sage-mode.el

       ;; Work around bug in python-send-command or compilation-forget-errors
       (unless (hash-table-p compilation-locs)
 	(compilation-minor-mode 1))
-      (python-send-string command))))
+      (python-send-string (concat command "\nprint('\\n')")))))
 
 (defun python-send-receive-to-buffer (command buffer &optional echo-output)
   "Send COMMAND to inferior Python (if any) and send output to BUFFER.

File emacs/sage-view.el

 WARNING: this communicates with the sage process.  Only use this
 when `sage-view' mode is enabled and sage is running."
   (interactive)
-  (sage-send-command "pretty_print_default(True);print('\\n')")
+  (sage-send-command "pretty_print_default(True)")
   (setq sage-view-inline-output-enabled t)
   (sage-view-update-modeline))
 
 WARNING: this communicates with the sage process.  Only use this
 when `sage-view' mode is enabled and sage is running."
   (interactive)
-  (sage-send-command "pretty_print_default(False);print('\\n')")
+  (sage-send-command "pretty_print_default(False)")
   (setq sage-view-inline-output-enabled nil)
   (sage-view-update-modeline))