Merge pull request #11 from jstenar/fixes2.0

Fixes2.0
This commit is contained in:
Jörgen Stenarson
2013-04-03 10:48:51 -07:00
9 changed files with 20 additions and 61 deletions
+2 -1
View File
@@ -3,4 +3,5 @@ dist
pyreadline.egg-info/
__pycache__/
*.bak
MANIFEST
MANIFEST
*.*~
+4 -4
View File
@@ -10,17 +10,17 @@ Current release version
-----------------------
Get the installer for the current installer at
https://launchpad.net/pyreadline/+download.
https://pypi.python.org/pypi/pyreadline/
Follow the instructions for configuration below.
Development version
-------------------
The devopment is hosted at https://launchpad.net/pyreadline
The devopment is hosted at https://github.com/pyreadline/pyreadline
The current trunk version can be pulled with bzr, :command:`bzr branch
lp:pyreadline`.
The current trunk version can be cloned with git, :command:`git clone
https://github.com/pyreadline/pyreadline.git`.
Install with the usual :command:`python setup.py install` from the pyreadline
folder.
+1 -12
View File
@@ -11,18 +11,7 @@ like python library can also be useful when implementing commandline like
interfaces in GUIs. The use of pyreadline for anything but the windows
console is still under development.
The pyreadline module support also Python 3.x.
Version 1.7 will be the last release with compatibility with 2.4 and 2.5. The next
major release will target 2.6, 2.7 and 3.x. The 1.7 series will only receive bugfixes
from now on.
Dependencies
------------
* ctypes
The pyreadline module supports Python versions 2.6, 2.7, and >3.2.
Conflicts
---------
-5
View File
@@ -9,8 +9,3 @@ Known issues
* Forward incremental search using ctrl-s is flaky because no keyrelease events are generated for ctrl-s
we use keypress events instead. As a work around ctrl-shift-r is also bound to forward incremental search.
* #488177 exceptions occur when using pyreadline on windows 2008 r2
* #526850 pyreadline causes conhost.exe to crash on windows 7. When pasting long text (>230 characters)
python crashes. Has been observed on Windows 7 with pyreadline 1.5, not a confirmed problem with pyreadline 1.6 series.
Workaround is to use the pyreadline paste instead i.e. ctrl-v.
+3 -2
View File
@@ -127,8 +127,9 @@ swedish systems). This means the filenames containing internationl characters
entered on interactive prompt will not work. The workaround here is to change
the codepage of your terminal to a more suitable one using the :command:`chcp`
command. For swedish systems :command:`chcp 1252` does the trick but you also
have to change the terminal font to `lucida console` using the properties
dialog for the console.
have to change the terminal font to a font compatible with the wanted code page
in the case of a swedish system that would be e.g. `lucida console`, or
`consolas` using the properties dialog for the console.
+1 -1
View File
@@ -27,7 +27,7 @@ class LineHistory(object):
self.history = []
self._history_length = 100
self._history_cursor = 0
self.history_filename = os.path.expanduser('~/.history') #Cannot expand unicode strings correctly on python2.4
self.history_filename = os.path.expanduser(ensure_str('~/.history')) #Cannot expand unicode strings correctly on python2.4
self.lastcommand = None
self.query = ""
self.last_search_for = ""
+6 -9
View File
@@ -5,7 +5,7 @@ from __future__ import print_function, unicode_literals, absolute_import
$Id$"""
#*****************************************************************************
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@kroywen.se>
#
#
# Distributed under the terms of the BSD License. The full license is in
@@ -23,9 +23,7 @@ name = 'pyreadline'
branch = ''
version = '2.0-dev1'
revision = '$Revision$'
version = '2.0'
description = "A python implmementation of GNU readline."
@@ -51,20 +49,18 @@ Features:
The latest development version is always available at the IPython subversion
repository_.
.. _repository:
.. _repository: https://github.com/pyreadline/pyreadline.git
"""
license = 'BSD'
authors = {'Jorgen' : ('Jorgen Stenarson','jorgen.stenarson@bostream.nu'),
authors = {'Jorgen' : ('Jorgen Stenarson','jorgen.stenarson@kroywen.se'),
'Gary': ('Gary Bishop', ''),
'Jack': ('Jack Trainor', ''),
}
url = 'http://http://ipython.org/pyreadline.html'
download_url = 'https://launchpad.net/pyreadline/+download'
download_url = 'https://pypi.python.org/pypi/pyreadline/'
platforms = ['Windows XP/2000/NT',
'Windows 95/98/ME']
@@ -78,4 +74,5 @@ classifiers = ['Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
]
+3 -3
View File
@@ -21,7 +21,7 @@ import pyreadline.console as console
import pyreadline.logger as logger
from pyreadline.keysyms.common import make_KeyPress_from_keydescr
from pyreadline.unicode_helper import ensure_unicode
from pyreadline.unicode_helper import ensure_unicode, ensure_str
from .logger import log
from .modes import editingmodes
from .error import ReadlineError, GetSetError
@@ -278,7 +278,7 @@ class BaseReadline(object):
self.callback(line)
def read_inputrc(self, #in 2.4 we cannot call expanduser with unicode string
inputrcpath=os.path.expanduser("~/pyreadlineconfig.ini")):
inputrcpath=os.path.expanduser(ensure_str("~/pyreadlineconfig.ini"))):
modes = dict([(x.mode,x) for x in self.editingmodes])
mode = self.editingmodes[0].mode
@@ -312,7 +312,7 @@ class BaseReadline(object):
pyreadline.lineeditor.lineobj.kill_ring_to_clipboard = killring
def sethistoryfilename(filename):
self.mode._history.history_filename=os.path.expanduser(filename)
self.mode._history.history_filename = os.path.expanduser(ensure_str(filename))
def setbellstyle(mode):
self.bell_style = mode
-24
View File
@@ -1,24 +0,0 @@
This is the refactor branch of pyreadline.
Goals:
- Decouple console from readline. In order to simplify future handling of terminals onother platforms than win32
- Decouple keyboard shortcut logic from lineditor functions
- Add unittests
- Improve cut paste logic to be more like other windows apps
- Make all subfunctionality like console, clipboard etc pluggable to simplify moving to other platforms.
pyreadline
clipboard.py - clipboard functions
console.py - terminal functions, read keyboard write to screen
keysyms.py - translate descriptions of keypresses to actual keyinfo
release.py - release info, description, copyright
rlmain.py - contains readline class, this is the entry point to readline functionality
lineditor
history.py - history buffer
lineobj.py - Contains linebuffer object, contains all editing functionality
wordmatcher - Contains functions that match word and non-words