ipython / vs \ in readline on MS Windows (and ipython help grepper)

Discussion in 'Python' started by bdb112, Mar 10, 2009.

  1. bdb112

    bdb112 Guest

    Q1/ I run a standard python ditribution with ipython and readline
    under cygwin. The tab filename completion works fine in the OS (bash
    shell) as expected, and tab filename completion at the ipython command
    line works, but with MS style path separators (backslash: run examples
    \test.py) which the run command itself interprets unix style
    ERROR: File `examplestest.py` not found.

    Also Q2/ can I "less" or "grep" the output from help(my_fun)

    Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
    (Intel)]
    IPython 0.8.4 -- An enhanced Interactive Python.
     
    bdb112, Mar 10, 2009
    #1
    1. Advertising

  2. bdb112

    bdb112 Guest

    Re: ipython / vs \ in readline on MS Windows (and ipython helpgrepper)

    More info:

    import readline
    ? readline
    c:\python25\lib\site-packages\ipython\rlineimpl.py
    $Id: Magic.py 1096 2006-01-28 20:08:02Z vivainio $

    sys.platform 'win32'
    sys.getfilesystemencoding() 'mbcs'
    sys.winver '2.5'

    $more /usr/local/bin/ipython
    #!/bin/bash
    C:/Python25/python.exe "C:\Python25\scripts\ipython" -pylab $*

    (Same problem if I use the windows Start menu Ipython IPython and
    pysh)



    On Mar 11, 7:34 am, bdb112 <> wrote:
    > Q1/ I run a standard python ditribution with ipython and readline
    > under cygwin.  The tab filename completion works fine in the OS (bash
    > shell) as expected, and tab filename completion at the ipython command
    > line works, but with MS style path separators (backslash: run examples
    > \test.py) which the run command itself interprets unix style
    > ERROR: File `examplestest.py` not found.
    >
    > Also Q2/ can I "less" or "grep" the output from help(my_fun)
    >
    > Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
    > (Intel)]
    > IPython 0.8.4 -- An enhanced Interactive Python.
     
    bdb112, Mar 10, 2009
    #2
    1. Advertising

  3. Re: ipython / vs \ in readline on MS Windows (and ipython helpgrepper)

    On Mar 10, 3:34 pm, bdb112 <> wrote:
    > Q1/ I run a standard python ditribution with ipython and readline
    > under cygwin.  The tab filename completion works fine in the OS (bash
    > shell) as expected, and tab filename completion at the ipython command
    > line works, but with MS style path separators (backslash: run examples
    > \test.py) which the run command itself interprets unix style
    > ERROR: File `examplestest.py` not found.
    >
    > Also Q2/ can I "less" or "grep" the output from help(my_fun)
    >
    > Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
    > (Intel)]
    > IPython 0.8.4 -- An enhanced Interactive Python.


    Cygwin does not magically change the platform you are on, the fact
    that you are on Windows is hard-coded into the Python.exe binary. Look
    for references to os.path.sep in IPython. Windows does let you use
    forward slashes as path separators, though, so I am not entirely sure
    what your issue is.
     
    Jason Scheirer, Mar 12, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gavino
    Replies:
    4
    Views:
    541
    gavino
    Sep 20, 2010
  2. sdaau
    Replies:
    0
    Views:
    1,282
    sdaau
    Nov 27, 2011
  3. David A. Black

    [ANN] Grepper: object-oriented grepping

    David A. Black, Dec 24, 2008, in forum: Ruby
    Replies:
    1
    Views:
    138
    Tiago Nogueira
    Dec 24, 2008
  4. David A. Black
    Replies:
    3
    Views:
    118
    Florian Gilcher
    Jan 19, 2009
  5. Andrew DeFaria
    Replies:
    1
    Views:
    214
    Ben Morrow
    Jan 30, 2008
Loading...

Share This Page