~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lazy_import.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-16 01:25:46 UTC
  • mfrom: (2071 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2080.
  • Revision ID: john@arbash-meinel.com-20061016012546-d01a0740671b4d73
[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    to inherit from them).
41
41
"""
42
42
 
43
 
import re
44
 
import sys
45
 
 
46
 
from bzrlib import (
47
 
    errors,
48
 
    )
49
 
 
50
43
 
51
44
class ScopeReplacer(object):
52
45
    """A lazy object that will replace itself in the appropriate scope.
377
370
    # This is just a helper around ImportProcessor.lazy_import
378
371
    proc = ImportProcessor(lazy_import_class=lazy_import_class)
379
372
    return proc.lazy_import(scope, text)
 
373
 
 
374
 
 
375
# The only module that this module depends on is 'bzrlib.errors'. But it
 
376
# can actually be imported lazily, since we only need it if there is a
 
377
# problem.
 
378
 
 
379
lazy_import(globals(), """
 
380
from bzrlib import errors
 
381
""")