This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
TabView - Clone of iOS Tabbed Application Bar | |
Copyright 2018 Michael Ruggiero | |
Released under MIT License - https://opensource.org/licenses/MIT | |
IMPORTANT: This was thrown together in tidbits of spare time while on my phone. It could definitely use a recfactor, | |
and as such, you may see some things which may not make sense, and/or aren't the greatest idea. |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Copyright 2018 Michael Ruggiero - This code is released under the MIT License. | |
Personal Request: If you find this useful, can you reach out to me on GitHub (create an issue, just email me michael AT ruggiero.co) I'd really love to see/hear how it was used. | |
Of course, it's MIT so you don't have to; just leave the copyright in-tact as per the license. | |
LICENSE: | |
Copyright 2018 Michael Ruggiero |
This file contains 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
import os, os.path, sys, urllib2, requests | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def _chunk_report(bytes_so_far, chunk_size, total_size): | |
if (total_size != None): |
This file contains 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
# Based on code found @ https://stackoverflow.com/a/18348004/7513482 | |
import collections | |
import sys | |
def namedtuple_with_defaults(typename, field_names, default_values=(), verbose=False, rename=False, module=None): | |
""" | |
Create a namedtuple object with customizable defaults. | |
Returns a new tuple subclass named typename |