Skip to content

Instantly share code, notes, and snippets.

@antnieszka
Last active December 21, 2016 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antnieszka/99dad7c7b5228e20ab3f7f0f2b94d70b to your computer and use it in GitHub Desktop.
Save antnieszka/99dad7c7b5228e20ab3f7f0f2b94d70b to your computer and use it in GitHub Desktop.
>>> t = getattr(mcpartools.scheduler.torque, "Torque")
>>> t
<class 'mcpartools.scheduler.torque.Torque'>
>>> b
'torque'
>>> b.title()
'Torque'
>>> t = getattr(mcpartools.scheduler.torque, b.title())
>>> t.__name__
'Torque'
>>> a = t(None)
>>> a.id()
'torque'
>>> a
<mcpartools.scheduler.torque.Torque object at 0x7fcd9ef47e80>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment