Python Forum

Full Version: a new kind of cut command
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i have run across the need many times to cut an input file that has a mix of delimiters (or is layered) or i need to columns in a different order, or often both. i have ideas on how to to express the desires and how to parse that expression. the need arose as a need for a command by my thought is to code it as a generator and use that generator in a simpler command.

any suggestions as to other needs that might fit into this? the generator would take a string and yield either a string or a list. i think it might be good to "compile" the expression into a sequence of actions such as function calls for reasonably faster performance.