-
-
Save whitmo/1176336 to your computer and use it in GitHub Desktop.
PyCodeConf Ticket Give-away
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 GitHubGiveAway(object): | |
questions = "day job",\ | |
"fav python project",\ | |
"fav conference",\ | |
"python foo" | |
answers = "Python DevOps Ninja Janitor Monkey @ SurveyMonkey, "\ | |
"ZDjangoGears by Ian Bicking or Starkiller or pythong.org, "\ | |
"Snow or Castle or Mountain Sprints or Pylons Project MiniCon, "\ | |
"so drunk when I wrote this I only had one eye I open".split(', ') | |
template = """{top_shelf} | |
{conbolus} | |
{big_bottoms} | |
""".replace(" ", '') | |
@classmethod | |
def cred_claimed(cls): | |
conbolus = "\n".join("%s: %s" %x for x in zip(cls.questions, cls.answers)) | |
big_bottoms = top_shelf = "-"*max(len(x) for x in conbolus.split('\n')) | |
return cls.template.format(**locals()) | |
if __name__ == "__main__": | |
print GitHubGiveAway.cred_claimed() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment