pyreadline: added copyright notices, begun work on egg setup

This commit is contained in:
jstenar
2006-01-25 20:07:13 +00:00
parent 9cdff4a3c8
commit a6887ae374
10 changed files with 202 additions and 58 deletions
-10
View File
@@ -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
+8
View File
@@ -1,3 +1,11 @@
2006-01-25 Jörgen Stenarson <jorgen.stenarson -at- bostream.nu>
* 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 <jorgen.stenarson -at- bostream.nu>
* Default is now to insert non bound characters.
+26
View File
@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
#*****************************************************************************
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
#
# 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'],
)
+10
View File
@@ -1,3 +1,13 @@
# -*- coding: utf-8 -*-
#*****************************************************************************
# Copyright (C) 2003-2006 Gary Bishop.
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
#
# 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',
+8
View File
@@ -1,3 +1,11 @@
# -*- coding: utf-8 -*-
#*****************************************************************************
# Copyright (C) 2003-2006 Jack Trainor.
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
#
# 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
+8
View File
@@ -1,3 +1,11 @@
# -*- coding: utf-8 -*-
#*****************************************************************************
# Copyright (C) 2003-2006 Gary Bishop.
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
#
# 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.
+8
View File
@@ -1,3 +1,11 @@
# -*- coding: utf-8 -*-
#*****************************************************************************
# Copyright (C) 2003-2006 Gary Bishop.
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
#
# 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
+57
View File
@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
"""Release data for the pyreadline project.
$Id$"""
#*****************************************************************************
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
#
#
# 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']
+54 -42
View File
@@ -1,3 +1,11 @@
# -*- coding: utf-8 -*-
#*****************************************************************************
# Copyright (C) 2003-2006 Gary Bishop.
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
#
# 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)
+23 -6
View File
@@ -1,10 +1,27 @@
# -*- coding: utf-8 -*-
#*****************************************************************************
# Copyright (C) 2003-2006 Gary Bishop.
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
#
# 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'],
)