I can't seem to get that to behave properly. It works fine in a python shell, like you're demonstrating it, but not as a command in a module.