Create lgis

This solution is much more elegant that what I'd done, but make sure to execute it as:
    python [filename].py > [outfilename] 
to avoid wrapping issues