diff --git a/.gitignore b/.gitignore index 0f34b10..a697c4a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ dist pyreadline.egg-info/ __pycache__/ *.bak -MANIFEST \ No newline at end of file +MANIFEST +*.*~ diff --git a/doc/source/installation.rst b/doc/source/installation.rst index e716bce..11f4749 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -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. diff --git a/doc/source/introduction.rst b/doc/source/introduction.rst index 028ffa1..9b9656f 100644 --- a/doc/source/introduction.rst +++ b/doc/source/introduction.rst @@ -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 --------- diff --git a/doc/source/known_issues.rst b/doc/source/known_issues.rst index a002042..d098b83 100644 --- a/doc/source/known_issues.rst +++ b/doc/source/known_issues.rst @@ -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. diff --git a/doc/source/usage.rst b/doc/source/usage.rst index d6a5142..204e1f8 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -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. diff --git a/pyreadline/lineeditor/history.py b/pyreadline/lineeditor/history.py index 1730cce..ab46c44 100644 --- a/pyreadline/lineeditor/history.py +++ b/pyreadline/lineeditor/history.py @@ -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 = "" diff --git a/pyreadline/release.py b/pyreadline/release.py index a265475..742cb61 100644 --- a/pyreadline/release.py +++ b/pyreadline/release.py @@ -5,7 +5,7 @@ from __future__ import print_function, unicode_literals, absolute_import $Id$""" #***************************************************************************** -# Copyright (C) 2006 Jorgen Stenarson. +# Copyright (C) 2006 Jorgen Stenarson. # # # 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', ] diff --git a/pyreadline/rlmain.py b/pyreadline/rlmain.py index bacce28..430efba 100644 --- a/pyreadline/rlmain.py +++ b/pyreadline/rlmain.py @@ -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 diff --git a/todo.txt b/todo.txt deleted file mode 100644 index 2540114..0000000 --- a/todo.txt +++ /dev/null @@ -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 - - - - - \ No newline at end of file