1 To Do list for improving code idioms
2 ####################################
7 * Remove all use of global variables.
9 * Reduce ‘if __name__ == '__main__'’ block to minimum.
11 * Use idiomatic ‘configparser’ processing.
13 * Remove direct query to ‘DEFAULT’ config section.
15 * Use ‘str.format’ for all string formatting and interpolation.
17 * Remove usage of ‘%’ formatting operator.
19 * Use ‘argparse’ for command-line parsing.
21 * Remove usage of ‘getopt’.
23 * Use ‘logging’ module throughout for all messages.
25 * Remove usage of ‘print’ for debug-level messages.
26 * Remove usage of ‘print’ for Informational messages.
27 * Remove usage of ‘print’ for warning message.
28 * Remove usage of ‘print’ for error messages.
29 * Remove usage of ‘print’ for critical error messages.
31 * Use ‘sys.stdout.write’ for all normal output.
33 * Remove usage of ‘print’ for normal output.
35 * Use ‘subprocess’ API for all subprocess interaction.
37 * Remove usage of ‘os.system’.
38 * Remove usage of ‘os.spawnv’.
39 * Remove usage of ‘os.popen’.
40 * Remove usage of ‘os.waitpid’.
42 * Use a Python native SSH library (e.g. Paramiko or Spur).
44 * Remove usage of subprocess for SSH.
46 * Use a Python native GnuPG library (e.g. ‘python-gnupg’).
48 * Remove usage of subprocess for GnuPG.
54 * Remove all use of global variables.
59 * dput.dput.dput_version
60 * dput.dput.files_to_remove
63 * Use ‘subprocess’ API for all subprocess interaction.
65 * Remove usage of ‘os.popen3’.
74 vim: fileencoding=utf-8 filetype=rst :