IPython - Enhanced Interactive Python

run command autocompletion uses backslashes in Windows

Reported by Kari Pulli on 2008-09-28
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IPython
Confirmed
Undecided
Unassigned
Nominated for Trunk by Hari

Bug Description

On WIndows XP IPython 0.9.rc1, autocompletion correctly often uses forward slash (/), for example with ls.
However, when I use the magic word run, with a script name, and the script needs command line arguments, the autocompletion uses backslashes.
Example: I type "run register.py images/1.jpg" and hit TAB, the line changes to "run register.py images\1.jpg", and by the time my script gets the argument, the backslash is gone, the filename becomes "images1.jpg"

Also, when I %run a script, it would be nice if the wild characters were evaluated before passing the parameters to python.
Example: "run register.py images/?.jpg" should expand to "register.py images/1.jpg images/2.jpg images/3.jpg". That's what it does on command line...

Hari (haridara) wrote :

The problem is not specific to completing arguments, it also exists for running scripts that are not in current directory. I am almost always in the dev root when I run iPython and so have to run scripts that are in subdirectories. When I use autocompletion, it introduces backslashes and so have to (painfully) remember to change them to forwardslashes before pressing enter. Since all the newer versions of windows almost always accept forwardslashes as good as backwardslashes, why not just stick to forwardslashes? For aruguments to external commands (e.g., dir), it would be a problem, but since I run all cygwin commands, I need ONLY forwardslashes.

Why not provide an option like vim's 'shellslash' and let the user choose?

Changed in ipython:
status: New → Confirmed
tags: added: windows
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers