:type '(alist regexp)
:group 'python)
+(defvar python-shell-output-filter-in-progress nil)
+(defvar python-shell-output-filter-buffer nil)
+
(defmacro python-shell--add-to-path-with-priority (pathvar paths)
"Modify PATHVAR and ensure PATHS are added only once at beginning."
`(dolist (path (reverse ,paths))
from __builtin__ import compile, eval, globals
else:
from builtins import compile, eval, globals
- sys.stdout.write('\\n')
try:
p, e = ast.parse(source, filename), None
except SyntaxError:
(python-shell--encode-string string)
(python-shell--encode-string (or (buffer-file-name)
"<string>")))))
+ (unless python-shell-output-filter-in-progress
+ (with-current-buffer (process-buffer process)
+ (save-excursion
+ (goto-char (process-mark process))
+ (insert-before-markers "\n"))))
(if (or (null (process-tty-name process))
(<= (string-bytes code)
(or (bound-and-true-p comint-max-line-length)
(file-name (or (buffer-file-name) temp-file-name)))
(python-shell-send-file file-name process temp-file-name t)))))
-(defvar python-shell-output-filter-in-progress nil)
-(defvar python-shell-output-filter-buffer nil)
-
(defun python-shell-output-filter (string)
"Filter used in `python-shell-send-string-no-output' to grab output.
STRING is the output received to this point from the process.