parent
f9482725d7
commit
1ea5d18fa5
|
@ -156,14 +156,15 @@ class Application(object):
|
||||||
'method.git',
|
'method.git',
|
||||||
)
|
)
|
||||||
for name in names:
|
for name in names:
|
||||||
exec("import %s" % name)
|
self.load_pmacs_methods(name)
|
||||||
mod = eval(name)
|
#exec("import %s" % name)
|
||||||
for mname in dir(mod):
|
#mod = eval(name)
|
||||||
if mname.startswith('_'):
|
#for mname in dir(mod):
|
||||||
continue
|
# if mname.startswith('_'):
|
||||||
cls = eval("%s.%s" % (name, mname))
|
# continue
|
||||||
if hasattr(cls, '_is_method') and cls._is_method:
|
# cls = eval("%s.%s" % (name, mname))
|
||||||
self.methods[cls._name()] = cls()
|
# if hasattr(cls, '_is_method') and cls._is_method:
|
||||||
|
# self.methods[cls._name()] = cls()
|
||||||
|
|
||||||
# ok, now let's load all the "standard" modes
|
# ok, now let's load all the "standard" modes
|
||||||
mode.install(self)
|
mode.install(self)
|
||||||
|
@ -262,6 +263,16 @@ class Application(object):
|
||||||
curses.halfdelay(1)
|
curses.halfdelay(1)
|
||||||
curses.def_prog_mode()
|
curses.def_prog_mode()
|
||||||
|
|
||||||
|
def load_pmacs_methods(self, name):
|
||||||
|
exec("import %s" % name)
|
||||||
|
mod = eval(name)
|
||||||
|
for mname in dir(mod):
|
||||||
|
if mname.startswith('_'):
|
||||||
|
continue
|
||||||
|
cls = eval("%s.%s" % (name, mname))
|
||||||
|
if hasattr(cls, '_is_method') and cls._is_method:
|
||||||
|
self.methods[cls._name()] = cls()
|
||||||
|
|
||||||
def _load_config_defaults(self):
|
def _load_config_defaults(self):
|
||||||
self.config['ignore_suffix'] = ['~', '-', 'CVS', '.svn', '.git', '.hg']
|
self.config['ignore_suffix'] = ['~', '-', 'CVS', '.svn', '.git', '.hg']
|
||||||
self.config['error_timeout'] = -1
|
self.config['error_timeout'] = -1
|
||||||
|
|
Loading…
Reference in New Issue