Monday, June 09, 2008

cmd2 0.3.4

I just keep having fun with cmd2 (and with sqlpython, which is built on cmd2 and inherits its goodies). The latest:
  • If you use > to redirect output and omit a destination filename, your output will go into the paste buffer. Then you can Ctrl-V and paste it into any window.
  • You can use the pipe symbol (|) just like in Unix, to redirect output into any shell command.

2 comments:

Evan said...

Hi, Catherine -

A great module cmd2. But I got a problem when I use cmd2.

The "cmd2 0.3.4" use xclip pipe for a enhancement you did, which means it can not work in a none-desktop environment, such as remote to server with SSH/TELNET, so that the script failed when log in a server without desktop environment.

I really appreciated that if I could get a help from you. Thanks very much.

++++++++++++++++++++++++++++++
>>> import cmd2
Error: Can't open display: (null)
Traceback (most recent call last):
File "stdin", line 1, in ?
File "cmd2.py", line 107, in ?
xclipproc.stdin.write(teststring)
IOError: [Errno 32] Broken pipe
++++++++++++++++++++++++++++++

Catherine said...

Thanks, evan - 0.3.4.1 has a fix which I think will take care of this. I hadn't thought of headless systems at all...