diff --git a/PKG-INFO b/PKG-INFO deleted file mode 100644 index a0d2109..0000000 --- a/PKG-INFO +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: readline -Version: 1.12 -Summary: Python implementation of GNU readline -Home-page: UNKNOWN -Author: Gary Bishop -Author-email: gb@cs.unc.edu -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN diff --git a/doc/ChangeLog b/doc/ChangeLog index 70bfca5..695b586 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,11 @@ +2006-01-25 Jörgen Stenarson + + * Added copyright notices to all files + * Created release.py file to contain relesase related information + * Started egg_setup.py + * Changed setup.py to use release.py + * + 2006-01-23 Jörgen Stenarson * Default is now to insert non bound characters. diff --git a/eggsetup.py b/eggsetup.py new file mode 100644 index 0000000..59193d5 --- /dev/null +++ b/eggsetup.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +#***************************************************************************** +# Copyright (C) 2006 Jorgen Stenarson. +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#***************************************************************************** + +from setuptools import setup,find_packages +execfile('pyreadline/release.py') + +setup(name=name, + version = version, + description = description, + long_description = long_description, + author = authors["Jorgen"][0], + author_email = authors["Jorgen"][1], + license = license, + url = url, + download_url = download_url, + platforms = platforms, + keywords = keywords, + packages = ['pyreadline'], + ) + diff --git a/pyreadline/__init__.py b/pyreadline/__init__.py index 22c0c3b..9ba9bf0 100644 --- a/pyreadline/__init__.py +++ b/pyreadline/__init__.py @@ -1,3 +1,13 @@ +# -*- coding: utf-8 -*- +#***************************************************************************** +# Copyright (C) 2003-2006 Gary Bishop. +# Copyright (C) 2006 Jorgen Stenarson. +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#***************************************************************************** + + from rlmain import * __all__ = [ 'parse_and_bind', 'get_line_buffer', diff --git a/pyreadline/clipboard.py b/pyreadline/clipboard.py index dcf5cb4..7835460 100644 --- a/pyreadline/clipboard.py +++ b/pyreadline/clipboard.py @@ -1,3 +1,11 @@ +# -*- coding: utf-8 -*- +#***************************************************************************** +# Copyright (C) 2003-2006 Jack Trainor. +# Copyright (C) 2006 Jorgen Stenarson. +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#***************************************************************************** ################################### # # Based on recipe posted to ctypes-users diff --git a/pyreadline/console.py b/pyreadline/console.py index 2040016..032cce5 100644 --- a/pyreadline/console.py +++ b/pyreadline/console.py @@ -1,3 +1,11 @@ +# -*- coding: utf-8 -*- +#***************************************************************************** +# Copyright (C) 2003-2006 Gary Bishop. +# Copyright (C) 2006 Jorgen Stenarson. +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#***************************************************************************** '''Cursor control and color for the Windows console. This was modeled after the C extension of the same name by Fredrik Lundh. diff --git a/pyreadline/keysyms.py b/pyreadline/keysyms.py index b45a2b0..598f28c 100644 --- a/pyreadline/keysyms.py +++ b/pyreadline/keysyms.py @@ -1,3 +1,11 @@ +# -*- coding: utf-8 -*- +#***************************************************************************** +# Copyright (C) 2003-2006 Gary Bishop. +# Copyright (C) 2006 Jorgen Stenarson. +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#***************************************************************************** import win32con as c32 from ctypes import windll import ctypes diff --git a/pyreadline/release.py b/pyreadline/release.py new file mode 100644 index 0000000..21f2af5 --- /dev/null +++ b/pyreadline/release.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +"""Release data for the pyreadline project. + +$Id$""" + +#***************************************************************************** +# Copyright (C) 2006 Jorgen Stenarson. +# +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#***************************************************************************** + +# Name of the package for release purposes. This is the name which labels +# the tarballs and RPMs made by distutils, so it's best to lowercase it. +name = 'pyreadline' + +# For versions with substrings (like 0.6.16.svn), use an extra . to separate +# the new substring. We have to avoid using either dashes or underscores, +# because bdist_rpm does not accept dashes (an RPM) convention, and +# bdist_deb does not accept underscores (a Debian convention). + + +version = '1.3.svn' + +revision = '$Revision$' + +description = "A python implmementation of GNU readline." + +long_description = \ +""" +The pyreadline package is a python implementation of GNU readline functionality. +It is not complete and does not necessarily strive for complete +compatibilty but rather convenience in use on the windows platform. It has been +tested for use with windows 2000 and windows xp. + +features: +- Copy and paste using the clipboard +- Smart paste for convenient use with ipython. Converting tab separated data to + python list or numpy array. Converting file paths to use / and escaping any + spaces using \ . +""" + +license = 'BSD' + +authors = {'Jorgen' : ('Jorgen Stenarson','jorgen.stenarson@bostream.nu'), + 'Gary': ('Gary Bishop', ''), + 'Jack': ('Jack Trainor', ''), + } + +url = 'http://ipython.scipy.org' + +download_url = 'http://ipython.scipy.org/dist' + +platforms = ['Windows XP/2000/NT','Windows 95/98/ME'] + +keywords = ['readline','pyreadline'] diff --git a/pyreadline/rlmain.py b/pyreadline/rlmain.py index e82fbb5..dc3e7cc 100644 --- a/pyreadline/rlmain.py +++ b/pyreadline/rlmain.py @@ -1,3 +1,11 @@ +# -*- coding: utf-8 -*- +#***************************************************************************** +# Copyright (C) 2003-2006 Gary Bishop. +# Copyright (C) 2006 Jorgen Stenarson. +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#***************************************************************************** ''' an attempt to implement readline for Python in Python using ctypes''' import string @@ -34,6 +42,10 @@ def quote_char(c): class ReadlineError(exceptions.Exception): pass +def inword(buffer,point): + return buffer[point:point+1] in [A-Za-z0-9] + + class Readline: def __init__(self): self.startup_hook = None @@ -1079,48 +1091,48 @@ class Readline: mode.''' # I often accidentally hold the shift or control while typing space - self._bind_key('Shift-space', self.self_insert) - self._bind_key('Control-space', self.self_insert) - self._bind_key('Return', self.accept_line) - self._bind_key('Left', self.backward_char) - self._bind_key('Control-b', self.backward_char) - self._bind_key('Right', self.forward_char) - self._bind_key('Control-f', self.forward_char) - self._bind_key('BackSpace', self.backward_delete_char) - self._bind_key('Home', self.beginning_of_line) - self._bind_key('End', self.end_of_line) - self._bind_key('Delete', self.delete_char) - self._bind_key('Control-d', self.delete_char) - self._bind_key('Clear', self.clear_screen) - self._bind_key('Alt-f', self.forward_word) - self._bind_key('Alt-b', self.backward_word) - self._bind_key('Control-l', self.clear_screen) - self._bind_key('Control-p', self.previous_history) - self._bind_key('Up', self.history_search_backward) - self._bind_key('Control-n', self.next_history) - self._bind_key('Down', self.history_search_forward) - self._bind_key('Control-a', self.beginning_of_line) - self._bind_key('Control-e', self.end_of_line) - self._bind_key('Alt-<', self.beginning_of_history) - self._bind_key('Alt->', self.end_of_history) - self._bind_key('Control-r', self.reverse_search_history) - self._bind_key('Control-s', self.forward_search_history) - self._bind_key('Alt-p', self.non_incremental_reverse_search_history) - self._bind_key('Alt-n', self.non_incremental_forward_search_history) - self._bind_key('Control-z', self.undo) - self._bind_key('Control-_', self.undo) - self._bind_key('Escape', self.prefix_meta) - self._bind_key('Meta-d', self.kill_word) - self._bind_key('Meta-Delete', self.backward_kill_word) - self._bind_key('Control-w', self.unix_word_rubout) - self._bind_key('Control-Shift-v', self.quoted_insert) - self._bind_key('Control-v', self.paste) - self._bind_key('Alt-v', self.ipython_paste) - self._bind_key('Control-y', self.paste) - self._bind_key('Control-k', self.kill_line) - self._bind_key('Control-m', self.set_mark) - self._bind_key('Control-q', self.copy_region_to_clipboard) -# self._bind_key('Control-shift-k', self.kill_whole_line) + self._bind_key('Shift-space', self.self_insert) + self._bind_key('Control-space', self.self_insert) + self._bind_key('Return', self.accept_line) + self._bind_key('Left', self.backward_char) + self._bind_key('Control-b', self.backward_char) + self._bind_key('Right', self.forward_char) + self._bind_key('Control-f', self.forward_char) + self._bind_key('BackSpace', self.backward_delete_char) + self._bind_key('Home', self.beginning_of_line) + self._bind_key('End', self.end_of_line) + self._bind_key('Delete', self.delete_char) + self._bind_key('Control-d', self.delete_char) + self._bind_key('Clear', self.clear_screen) + self._bind_key('Alt-f', self.forward_word) + self._bind_key('Alt-b', self.backward_word) + self._bind_key('Control-l', self.clear_screen) + self._bind_key('Control-p', self.previous_history) + self._bind_key('Up', self.history_search_backward) + self._bind_key('Control-n', self.next_history) + self._bind_key('Down', self.history_search_forward) + self._bind_key('Control-a', self.beginning_of_line) + self._bind_key('Control-e', self.end_of_line) + self._bind_key('Alt-<', self.beginning_of_history) + self._bind_key('Alt->', self.end_of_history) + self._bind_key('Control-r', self.reverse_search_history) + self._bind_key('Control-s', self.forward_search_history) + self._bind_key('Alt-p', self.non_incremental_reverse_search_history) + self._bind_key('Alt-n', self.non_incremental_forward_search_history) + self._bind_key('Control-z', self.undo) + self._bind_key('Control-_', self.undo) + self._bind_key('Escape', self.prefix_meta) + self._bind_key('Meta-d', self.kill_word) + self._bind_key('Meta-Delete', self.backward_kill_word) + self._bind_key('Control-w', self.unix_word_rubout) + self._bind_key('Control-Shift-v', self.quoted_insert) + self._bind_key('Control-v', self.paste) + self._bind_key('Alt-v', self.ipython_paste) + self._bind_key('Control-y', self.paste) + self._bind_key('Control-k', self.kill_line) + self._bind_key('Control-m', self.set_mark) + self._bind_key('Control-q', self.copy_region_to_clipboard) +# self._bind_key('Control-shift-k', self.kill_whole_line) def vi_editing_mode(self, e): # (M-C-j) diff --git a/setup.py b/setup.py index 4e382ad..b99c270 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,27 @@ +# -*- coding: utf-8 -*- + +#***************************************************************************** +# Copyright (C) 2003-2006 Gary Bishop. +# Copyright (C) 2006 Jorgen Stenarson. +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#***************************************************************************** + from distutils.core import setup -setup(name="pyreadline", - version="1.13-svn", - description="Python implementation of GNU readline", - author="Gary Bishop", - author_email="gb@cs.unc.edu", - packages=['pyreadline'], +execfile('pyreadline/release.py') +setup(name=name, + version = version, + description = description, + long_description = long_description, + author = authors["Jorgen"][0], + author_email = authors["Jorgen"][1], + license = license, + url = url, + download_url = download_url, + platforms = platforms, + keywords = keywords, + packages = ['pyreadline'], )