Package common :: Module GnuPGInterface :: Class Options
[hide private]
[frames] | no frames]

Class Options

source code

Objects of this class encompass options passed to GnuPG. This class is responsible for determining command-line arguments which are based on options. It can be said that a GnuPG object has-a Options object in its options attribute.

Attributes which correlate directly to GnuPG options:

Each option here defaults to false or None, and is described in GnuPG documentation.

Booleans (set these attributes to booleans)

Strings (set these attributes to strings)

Lists (set these attributes to lists)

Meta options

Meta options are options provided by this module that do not correlate directly to any GnuPG option by name, but are rather bundle of options used to accomplish a specific goal, such as obtaining compatibility with PGP 5. The actual arguments each of these reflects may change with time. Each defaults to false unless otherwise specified.

meta_pgp_5_compatible -- If true, arguments are generated to try to be compatible with PGP 5.x.

meta_pgp_2_compatible -- If true, arguments are generated to try to be compatible with PGP 2.x.

meta_interactive -- If false, arguments are generated to try to help the using program use GnuPG in a non-interactive environment, such as CGI scripts. Default is true.

extra_args -- Extra option arguments may be passed in via the attribute extra_args, a list.

>>> import GnuPGInterface
>>>
>>> gnupg = GnuPGInterface.GnuPG()
>>> gnupg.options.armor = 1
>>> gnupg.options.recipients = ['Alice', 'Bob']
>>> gnupg.options.extra_args = ['--no-secmem-warning']
>>>
>>> # no need for users to call this normally; just for show here
>>> gnupg.options.get_args()
['--armor', '--recipient', 'Alice', '--recipient', 'Bob', '--no-secmem-warning']
Instance Methods [hide private]
 
__init__(self) source code
 
get_args(self)
Generate a list of GnuPG arguments based upon attributes
source code
 
get_standard_args(self)
Generate a list of standard, non-meta or extra arguments
source code
 
get_meta_args(self)
Get a list of generated meta-arguments
source code
Method Details [hide private]

__init__(self)
(Constructor)

source code 

get_args(self)

source code 
Generate a list of GnuPG arguments based upon attributes

get_standard_args(self)

source code 
Generate a list of standard, non-meta or extra arguments

get_meta_args(self)

source code 
Get a list of generated meta-arguments