[IPython-dev] Bug in pysh?

Fernando Perez Fernando.Perez at colorado.edu
Wed Dec 15 10:15:53 CST 2004


Hey Prabhu,

Prabhu Ramachandran wrote:

> I just ran into this little problem with pysh-0.6.5
> 
>    |35> ls -l | tr -s [:blank:] | cut -d' ' -f 5-5
> [...]
> 
> This works fine.  Unfortunately, this does not:
> 
>    $$a = ls -l | tr -s [:blank:] | cut -d' ' -f 5-5
>    cut: the delimiter must be a single character
>    Try `cut --help' for more information.
> 
> To get this to work I need to escape the quotes like so:
> 
>    $$a = ls -l | tr -s [:blank:] | cut -d\' \' -f 5-5
> 
> I was surprised at first but realized it was the quoting.  So if this
> is fixable, that would be cool.  If not perhaps it could be documented
> somewhere?

indeed, it's a bug.  It should be fixable, I'll have a look.  Thanks for the 
report.

Note that pysh only gets relatively lightweight use from me (for no particular 
reason I don't use it fulltime, just habit I guess).  Which means there are 
probably lots of small things which don't work quite right.  I'm thinking of 
adding a pyshdebug magic toggle which would activate printing of the 
auto-modified pysh lines, to ease with debugging.

Best,

f

ps. Thanks for helping John Lee with the emacs issues!  I wrote yesterday to 
you, but it seems the Colorado.EDU SMTP server has been blacklisted by 
spamhaus, so my messages to sourceforge.net from the office now bounce.  I am 
now writing from home.




More information about the IPython-dev mailing list