[IPython-User] Expanding glob* parameters for %run

Adam Davis addavis@fosterandpartners....
Thu Jul 19 03:25:46 CDT 2012

Hi Thomas,

If I might further complicate matters: on Windows, cmd and powershell do
not glob. The .exe files installed by setup-tools/distribute in the
Scripts directory (equivalent to 'bin' on *NIX) of the python
installation _do_ glob through some magic of the setup-tools routines,
in my experience.

I would prefer to see IPython behave consistently across platforms, and
to have globbing enabled by default. I just wanted to raise the point
that if the goal is to remain as consistent as possible with existing
user expectations and code, some Windows users may be impacted. Thus, I
would respond to your second question that yes, there may be a need to
disable globbing (though I don't have a specific use case to hand).



-----Original Message-----
From: ipython-user-bounces@scipy.org
[mailto:ipython-user-bounces@scipy.org] On Behalf Of Thomas Kluyver
Sent: 18 July 2012 22:32
To: IPython User list
Subject: [IPython-User] Expanding glob* parameters for %run

Bringing discussion from PR #2165 to this mailing list.

In most shells, if you do "python myscript.py foo*", the foo* is
expanded into "foo1 foo2 foo.jpg" before your script sees it. At
present, doing the equivalent in ipython - %run myscript.py foo* - will
just leave the argument as foo*. PR #2165 aims to make it possible to
get foo* expanded like in a shell.

1. Do you think this should be enabled by default, or should it require
an argument (like -g) to expand these patterns? %run mostly aims to work
like a command line, but if anyone is relying on the old behaviour, we
should be careful about changing it suddenly.
2. If expansion should be enabled by default, is there a need for an
argument to explicitly disable it? Or is it sufficient to escape special
characters (foo\*) where they're needed?

IPython-User mailing list

More information about the IPython-User mailing list