Skip to content

Instantly share code, notes, and snippets.

View tul's full-sized avatar

Mark Tully tul

View GitHub Profile
@tul
tul / shellista.py
Created December 24, 2012 02:11
shellista
import os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip
# You can skip over reading this class, if you like.
# It's an implementation of mine of the bash parser in pure python
# This has advantages over shlex, glob, and shlex->glob in that it expects
# the strings to represent files from the start.
class BetterParser:
def __init__(self):
self.env_vars = {"$HOME": os.path.expanduser('~')}