Skip to content

Commit

Permalink
Fixed rmagic on Windows.
Browse files Browse the repository at this point in the history
Backslashes are misinterpreted as escape-sequences by the R-interpreter.
  • Loading branch information
filmor committed Nov 19, 2012
1 parent 4e73029 commit 995ece0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IPython/extensions/rmagic.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def R(self, line, cell=None, local_ns=None):
# execute the R code in a temporary directory

tmpd = tempfile.mkdtemp()
self.r('png("%s/Rplots%%03d.png",%s)' % (tmpd, png_args))
self.r('png("%s/Rplots%%03d.png",%s)' % (tmpd.replace('\\', '/'), png_args))

text_output = ''
if line_mode:
Expand Down

0 comments on commit 995ece0

Please sign in to comment.