Package diffpy :: Package pdfgui :: Package gui :: Module debugoptions :: Class DebugOptions
[hide private]
[frames] | no frames]

Class DebugOptions

source code

DebugOptions is a place to store various debugging options.
There should be just one instance defined in pdfguiglobals module.
It would be nice to have a simple way of setting them on command line

Options in short and long forms:
    noed, noerrordialog  -- [False], disable exceptions catching and
                            display in ErrorReportDialog
    nocf, noconfirm      -- boolean (default False), exit without asking to
                            save modified project file
    pdb, pythondebugger  -- use python debugger to handle error exceptions
                            instead of ErrorReportDialog



Instance Methods [hide private]
 
__init__(self)
Initialize DebugOptions, by default all of them are off.
source code
 
__setattr__(self, name, value)
Map short options to their long equivalents.
source code
 
__getattr__(self, name)
Resolve values of short options.
source code
Class Variables [hide private]
  alldebugoptions = (('noed', 'noerrordialog'), ('nocf', 'noconf...
  short2long = {'nocf': 'noconfirm', 'noed': 'noerrordialog', 'p...
Method Details [hide private]

__getattr__(self, name)
(Qualification operator)

source code 
Resolve values of short options.
This is called only when normal lookup fails.

returns value of short debug option


Class Variable Details [hide private]

alldebugoptions

Value:
(('noed', 'noerrordialog'),
 ('nocf', 'noconfirm'),
 ('pdb', 'pythondebugger'))

short2long

Value:
{'nocf': 'noconfirm',
 'noed': 'noerrordialog',
 'pdb': 'pythondebugger'}