parent
1d1f26e8c2
commit
479e95bc92
|
@ -132,7 +132,7 @@ class Application(object):
|
|||
exec("import mode.%s; mode.%s.install(self)" % (name, name))
|
||||
|
||||
# create all the insert methods for the character ranges we like
|
||||
for c in string.letters + string.digits + string.punctuation:
|
||||
for c in string.ascii_letters + string.digits + string.punctuation:
|
||||
obj = method.InsertString(c)
|
||||
self.methods[obj.name] = obj
|
||||
obj = method.OverwriteChar(c)
|
||||
|
@ -207,7 +207,7 @@ class Application(object):
|
|||
self.config['error_timeout'] = -1
|
||||
self.config['max_error_len'] = 192
|
||||
self.config['max_num_kills'] = 64
|
||||
self.config['word_letters'] = string.letters + string.digits
|
||||
self.config['word_letters'] = string.ascii_letters + string.digits
|
||||
self.config['default_color'] = ('default', 'default',)
|
||||
self.config['margin'] = 80
|
||||
self.config['margin_color'] = 'blue'
|
||||
|
|
|
@ -268,7 +268,7 @@ class Fundamental(Handler):
|
|||
self.word_letters = w.application.config['word_letters']
|
||||
|
||||
# create all the insert actions for the basic text input
|
||||
for c in string.letters + string.digits + string.punctuation:
|
||||
for c in string.ascii_letters + string.digits + string.punctuation:
|
||||
self.add_binding('insert-string-%s' % c, c)
|
||||
|
||||
# per-mode bindings
|
||||
|
|
|
@ -234,7 +234,7 @@ class Hex(Fundamental):
|
|||
cgreen = color.build('green', 'default', 'bold')
|
||||
ccyan = color.build('cyan', 'default', 'bold')
|
||||
ccursor = color.build('default', 'default', 'bold', 'reverse')
|
||||
for c in string.letters + string.digits + string.punctuation + ' ':
|
||||
for c in string.ascii_letters + string.digits + string.punctuation + ' ':
|
||||
_ctrans[ord(c)] = c
|
||||
ctrans = ''.join(_ctrans)
|
||||
actions = [HexForward, HexBackward, HexForwardWord, HexBackwardWord,
|
||||
|
@ -363,7 +363,7 @@ class Hex(Fundamental):
|
|||
self.add_bindings('goto-address', ('C-c M-g',))
|
||||
|
||||
# create all the insert actions for the basic text input
|
||||
for c in string.letters + string.digits + string.punctuation:
|
||||
for c in string.ascii_letters + string.digits + string.punctuation:
|
||||
self.add_action_and_bindings(HexOverwriteChar(c), (c,))
|
||||
self.add_bindings('hex-overwrite-char-space', ('SPACE',))
|
||||
self.add_bindings('hex-overwrite-char-tab', ('TAB',))
|
||||
|
|
|
@ -66,7 +66,7 @@ class InsertMini(Fundamental):
|
|||
self.add_bindings('mini-insert-complete', ('M-RETURN',))
|
||||
self.add_bindings('mini-insert-cancel', ('C-]', 'C-g'))
|
||||
self.add_bindings('mini-insert-tab', ('TAB',))
|
||||
for c in string.letters + string.digits + string.punctuation:
|
||||
for c in string.ascii_letters + string.digits + string.punctuation:
|
||||
self.add_binding('insert-string-%s' % c, c)
|
||||
|
||||
install = InsertMini.install
|
||||
|
|
|
@ -142,7 +142,7 @@ class IperlMini(Fundamental):
|
|||
self.add_bindings('iperl-page-down', ('C-v',))
|
||||
self.add_bindings('iperl-goto-beginning', ('M-<',))
|
||||
self.add_bindings('iperl-goto-end', ('M->',))
|
||||
for c in string.letters + string.digits + string.punctuation:
|
||||
for c in string.ascii_letters + string.digits + string.punctuation:
|
||||
self.add_binding('insert-string-%s' % c, c)
|
||||
|
||||
install = IperlMini.install
|
||||
|
|
|
@ -114,7 +114,7 @@ class IpythonMini(mode.Fundamental):
|
|||
self.add_bindings('ipython-page-down', ('C-v',))
|
||||
self.add_bindings('ipython-goto-beginning', ('M-<',))
|
||||
self.add_bindings('ipython-goto-end', ('M->',))
|
||||
for c in string.letters + string.digits + string.punctuation:
|
||||
for c in string.ascii_letters + string.digits + string.punctuation:
|
||||
self.add_binding('insert-string-%s' % c, c)
|
||||
|
||||
install = IpythonMini.install
|
||||
|
|
|
@ -619,7 +619,7 @@ class PerlOpenModule(Method):
|
|||
else:
|
||||
w.set_error("Could not find module %r" % vargs['module'])
|
||||
class PerlOpenModuleWord(Method):
|
||||
namechars = string.letters + string.digits + '_'
|
||||
namechars = string.ascii_letters + string.digits + '_'
|
||||
def _execute(self, w, **vargs):
|
||||
word = pkg = w.get_token().string
|
||||
path = None
|
||||
|
|
|
@ -139,7 +139,7 @@ class Search(Fundamental):
|
|||
self.add_bindings('search-delete-left-word', ('M-DELETE', 'M-BACKSPACE',))
|
||||
|
||||
# create all the insert actions for the character ranges we like
|
||||
for collection in (string.letters, string.digits, string.punctuation):
|
||||
for collection in (string.ascii_letters, string.digits, string.punctuation):
|
||||
for c in collection:
|
||||
self.add_action_and_bindings(InsertSearchString(c), (c,))
|
||||
self.add_action_and_bindings(InsertSearchString(' '), ('SPACE',))
|
||||
|
|
2
term.py
2
term.py
|
@ -5,7 +5,7 @@ from point import Point
|
|||
# entry. otherwise this project is probably hopeless.
|
||||
|
||||
def show(c):
|
||||
if c in string.letters + string.digits + string.punctuation + ' ':
|
||||
if c in string.ascii_letters + string.digits + string.punctuation + ' ':
|
||||
return c
|
||||
else:
|
||||
return '\\%03o' % ord(c)
|
||||
|
|
Loading…
Reference in New Issue