Skip to content

Instantly share code, notes, and snippets.

Avatar
👽

Danila Vershinin dvershinin

👽
View GitHub Profile
@tanbro
tanbro / remake_pyconly_wheel.py
Last active Feb 21, 2020
A small tool Re-Pack a Python Wheel to a PYC-Only One
View remake_pyconly_wheel.py
# -*- coding: utf-8 -*-
"""
Re-Pack `Wheel` to a PYC-Only One
"""
from __future__ import print_function, unicode_literals
import argparse
import compileall
@fawix
fawix / verbose.py
Created Apr 13, 2017
Python - Verbose Flag
View verbose.py
#!/usr/bin/python
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-v', '--verbose', action='count', default=0)
for c in ['', '-v', '-v -v', '-vv', '-vv -v', '-v -v --verbose -vvvv']:
print parser.parse_args(c.split())