Switch to configargparse
Please, consider switch the argument parser from argparse to configargparse. While this is an external dependency, it provides really simple way to handle environment variables and is real replacement, thus all what is needed is to add the env_var option on argument create:
if __name__ == '__main__':
# Parse arguments.
parser = configargparse.ArgumentParser(
description='Listen on unix socket and send syslog messages to \
XMPP chatroom.')
parser.add_argument('--jid', help='JID to use',
env_var='JID_NAME', required=True)
# etc
The ENV names are listed in -h output... I suggest this, because i prefer no private info in process list (nor JID & ROOM names) and implementation of ENV is simplest than currently used.
If you do not like this change, simple close it.