Created
May 16, 2016 10:10
-
-
Save cyberbikepunk/a219de69bfad2c174e840cd24fd74f58 to your computer and use it in GitHub Desktop.
Print all CAPITALIZED settings in a settings file.
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
def show_settings(): | |
""" Echo all settings. """ | |
print('Current m5 settings:', end='\n\n') | |
objects = dir(modules[__name__]) | |
parameters = [x for x in objects if x.isupper() and x is not 'PASSWORD'] | |
for p in parameters: | |
value = getattr(modules[__name__], p) | |
print('{item} = {value!r}'.format(item=p.rjust(20, ' '), value=value)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment