Last active
December 21, 2016 23:14
-
-
Save antnieszka/99dad7c7b5228e20ab3f7f0f2b94d70b to your computer and use it in GitHub Desktop.
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
>>> 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