This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FullPaths(argparse.Action): | |
| """Expand user- and relative-paths""" | |
| def __call__(self, parser, namespace, values, option_string=None): | |
| setattr(namespace, self.dest, os.path.abspath(os.path.expanduser(values))) | |
| def get_args(): | |
| parser = argparse.ArgumentParser(description='Something smart here') | |
| parser.add_argument('my_conf', help='The configuration file for the db', action = FullPaths) | |
| return parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python2 | |
| import os | |
| import argparse | |
| def argv_parse(): | |
| parser = argparse.ArgumentParser( | |
| add_help=True, | |
| description='Find big dirrectories', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python2 | |
| # -*- coding: utf-8 -*- | |
| import os | |
| import re | |
| import argparse | |
| from git import Repo | |
| from jinja2 import Environment | |
| from mailer import Message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import os | |
| import re | |
| import json | |
| from io import open | |
| from subprocess import Popen, PIPE | |
| from tabulate import tabulate |
OlderNewer