1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import os
- import pkg_resources
- appname = "Pwman3"
- try:
- version = pkg_resources.get_distribution('pwman3').version
- except pkg_resources.DistributionNotFound:
- version = "0.5"
- website = "http://github.com/pwman3/pwman3"
- author = "Oz Nahum"
- authoremail = "nahumoz@gmail.com"
- description = "Pwman -a command line password management application."
- keywords = "password management sqlite crypto"
- def which(cmd):
- _, cmdname = os.path.split(cmd)
- for path in os.environ["PATH"].split(os.pathsep):
- cmd = os.path.join(path, cmdname)
- if os.path.isfile(cmd) and os.access(cmd, os.X_OK):
- return cmd
- config_dir = os.path.expanduser("~/.pwman")
- default_config = {'Global': {'umask': '0100', 'colors': 'yes',
- 'cls_timeout': '5'
- },
- 'Database': {'type': 'SQLite',
- 'filename': os.path.join(config_dir,
- "pwman.db")},
- 'Encryption': {'algorithm': 'AES'},
- 'Readline': {'history': os.path.join(config_dir,
- "history")}
- }
|