I see paths that have the ~ in them (used to shorten the path). I
don't know how to fix this and I need to keep moving to get this out.
Brian
On Fri, Apr 24, 2009 at 3:42 PM, Fernando Perez <email address hidden> wrote:
> Brian, I don't see this bug:
>
> In [5]: import tempfile
>
> In [6]: f = tempfile.NamedTemporaryFile()
>
> In [7]: f.write('print 999\n')
>
> In [8]: f.flush()
>
> In [9]: %run $f.name
> 999
>
>
> This works fine for me on linux. Is it an issue with spaces in the paths you're seeing instead? It's possible that the problem is that %run doesn't handle paths with spaces in them...
>
> --
> %run doesn't work with paths returned by tempfile.NamedTemporaryFile()
> https://bugs.launchpad.net/bugs/366353
> You received this bug notification because you are a member of IPython
> Developers, which is subscribed to IPython.
>
> Status in IPython - Enhanced Interactive Python: New
>
> Bug description:
> In test_magic we use tempfile.NamedTemporaryFile() to create files that are used with %run during the test suite. The paths created by tempfile don't play well with %run:
>
> To reproduce, do:
>
> import tempfile
> f = tempfile.NamedTemporaryFile()
> f.write('pass\n')
> %run $f.name
>
--
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
<email address hidden>
<email address hidden>
I see paths that have the ~ in them (used to shorten the path). I
don't know how to fix this and I need to keep moving to get this out.
Brian
On Fri, Apr 24, 2009 at 3:42 PM, Fernando Perez <email address hidden> wrote: NamedTemporaryF ile() NamedTemporaryF ile() /bugs.launchpad .net/bugs/ 366353 NamedTemporaryF ile() to create files that are used with %run during the test suite. The paths created by tempfile don't play well with %run: NamedTemporaryF ile()
> Brian, I don't see this bug:
>
> In [5]: import tempfile
>
> In [6]: f = tempfile.
>
> In [7]: f.write('print 999\n')
>
> In [8]: f.flush()
>
> In [9]: %run $f.name
> 999
>
>
> This works fine for me on linux. Is it an issue with spaces in the paths you're seeing instead? It's possible that the problem is that %run doesn't handle paths with spaces in them...
>
> --
> %run doesn't work with paths returned by tempfile.
> https:/
> You received this bug notification because you are a member of IPython
> Developers, which is subscribed to IPython.
>
> Status in IPython - Enhanced Interactive Python: New
>
> Bug description:
> In test_magic we use tempfile.
>
> To reproduce, do:
>
> import tempfile
> f = tempfile.
> f.write('pass\n')
> %run $f.name
>
--
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
<email address hidden>
<email address hidden>