Export all subkeys in key to globals.
(key, ignore)
| 46 | raise NotImplementedError, 'Cannot solve for %s' % type(value) |
| 47 | |
| 48 | def _export(key, ignore): |
| 49 | 'Export all subkeys in key to globals.' |
| 50 | try: |
| 51 | GLOBAL = globals() |
| 52 | root = _wi.Key(_wi.HKEY.CURRENT_USER, key) |
| 53 | for key in root.keys: |
| 54 | GLOBAL[key] = obj = _Virtual(_wi.Key(root, key, _wi.KEY.ALL_ACCESS)) |
| 55 | attr = getattr(_in, key) |
| 56 | delattr(_in, key) |
| 57 | if key not in ignore: |
| 58 | for key in obj: |
| 59 | assert type(obj[key]) == type(attr[key]) |
| 60 | del attr[key] |
| 61 | assert not attr |
| 62 | assert not sum(map(lambda name: name.isupper(), dir(_in))) |
| 63 | except: |
| 64 | _TK.Tk().withdraw() |
| 65 | _MB.showerror('Error', 'Please install this program first.') |
| 66 | raise SystemExit, 1 |
| 67 | |
| 68 | ################################################################################ |
| 69 |
no test coverage detected