[IPython-user] strange issues...
Ville M. Vainio
Sat Aug 18 15:48:04 CDT 2007
On 8/18/07, fred <email@example.com> wrote:
> Hi all,
> I get strange issues (ie I don't understand):
> 1) Using the -p option seems to break some magic:
> If I type %p + TAB, I get:
> In : %p
> %p %pdb %pdoc %pinfo %profile %psearch %pwd
> %page %pdef %pfile %popd %prun %pushd %pycat
> without -p option, and
> In : %p
> %page %pdb %pinfo %popd %profile %prun %psearch
> %pushd %pwd %pycat
> with -p option.
It's because the default profile is different, it leaves these
"unnecessary" magics around for backwards compatibility/familiarity.
If you always want them, add "import ipy_legacy" to your
> 2) issue with aliases
> I want to define a few aliases such as
> p = 'cd -'
> q = 'cd ..'
> like the aliases I use under tcsh.
> The problem is that using these aliases does not update the current
> working directory.
Only the "magic" cd works that way. You need to define %macro for these.
> I guess this is related to the subshell (the subshell goes to dir, but
> when it
> exits, cwd in ipython has not been modified, of course).
> Should I define my own magic ?
That, a function, or a macro as I said.
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
More information about the IPython-user