]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
(py-execute-file, py-execute-import-or-reload): Use a Python `raw'
authorBarry Warsaw <barry@python.org>
Thu, 24 Sep 1998 23:48:40 +0000 (23:48 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 24 Sep 1998 23:48:40 +0000 (23:48 +0000)
string in the argument to execfile() so a Windows temp directory
named, e.g. c:\\tmp doesn't get interpreted as a file name with an
embedded tab!  (given by C. Waldman).

Misc/python-mode.el

index 0a7982fd79a2fe5a2cfb865538622f905a6cf433..61ae46518b5096a7b70efc77703b3148f38d0fd7 100644 (file)
@@ -1040,7 +1040,7 @@ comint believe the user typed this string so that
        (procbuf (process-buffer proc))
 ;      (comint-scroll-to-bottom-on-output t)
        (msg (format "## working on region in file %s...\n" filename))
-       (cmd (format "execfile('%s')\n" filename)))
+       (cmd (format "execfile(r'%s')\n" filename)))
     (unwind-protect
        (save-excursion
          (set-buffer procbuf)
@@ -1318,7 +1318,7 @@ This may be preferable to `\\[py-execute-buffer]' because:
                         (file-name-nondirectory file))))
                  (format "if globals().has_key('%s'):\n    reload(%s)\nelse:\n    import %s\n"
                          f f f))
-             (format "execfile('%s')\n" file))
+             (format "execfile(r'%s')\n" file))
            async))
       ;; else
       (py-execute-buffer async))))