Issue 6 in python-for-android: adding readline module

116 views
Skip to first unread message

python-fo...@googlecode.com

unread,
Mar 11, 2011, 10:10:42 AM3/11/11
to python-fo...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 6 by israel.fruchter: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

Can you also compile readline module in python ?

python-fo...@googlecode.com

unread,
Mar 20, 2011, 3:14:00 AM3/20/11
to python-fo...@googlegroups.com
Updates:
Status: Accepted
Labels: -Type-Defect Type-Enhancement

Comment #1 on issue 6 by rjmatthews62: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

(No comment was entered for this change.)

python-fo...@googlecode.com

unread,
Oct 9, 2011, 2:25:15 PM10/9/11
to python-fo...@googlegroups.com

Comment #2 on issue 6 by bradpitc...@gmail.com: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

Is anyone working on this? I tried to get this working by compiling with
the NDK as described in the wiki. It requires libncurses.a, which I
eventually figured out using this blog for guidelines:
http://credentiality2.blogspot.com/2010/08/compile-ncurses-for-android.html

Then there was an issue not being about to find setpwent or getpwent. I
brazenly deleted the offending code and eventually got an egg.
Unfortunately, it looks like something is wrong with the library I built
with NDK.
When I "import readline" I get:
ImportError: Cannot load library: load_segments[928]: 600 failed to map
segment from 'readline.so' @ <some assembly stuff here>

At this point I'm pretty well stuck, maybe someone else will know what to
do.

python-fo...@googlecode.com

unread,
Apr 3, 2012, 10:20:18 AM4/3/12
to python-fo...@googlegroups.com
Updates:
Status: Started
Owner: rjmatthews62

Comment #3 on issue 6 by rjmatthews62: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

Added to Python3
Will be looking to backport to Python2 in the next few weeks.

python-fo...@googlecode.com

unread,
Sep 21, 2012, 2:04:38 AM9/21/12
to python-fo...@googlegroups.com

Comment #4 on issue 6 by bwanama...@gmail.com: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

Yay, my fingers are so tired

python-fo...@googlecode.com

unread,
Sep 22, 2012, 11:33:45 PM9/22/12
to python-fo...@googlegroups.com

Comment #5 on issue 6 by bwanama...@gmail.com: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

I would actually rather have 2.6 with readline than 2.7 without it. Does
that make sense?

Robbie Matthews

unread,
Sep 23, 2012, 12:41:39 AM9/23/12
to python-fo...@googlegroups.com
If I get stuck into the 2.7 project, it's one of the first things I intend to add.
Unfortunately, 2.6.2 has such an eccentric build that incorporating the readline was very difficult.
It'll be easier to incorporate in 2.7.

Robbie
--

Beginning Android Tablet Programming

  • Publication Date: November 2, 2011
  • ISBN13: 978-1-4302-3783-9

Robbie Matthews gives a full, no-holds barred introduction to Android  programming for tablets. No previous experience required! Learn More …

Beginning Android Tablet Programming


python-fo...@googlecode.com

unread,
Oct 18, 2012, 6:47:42 PM10/18/12
to python-fo...@googlegroups.com

Comment #6 on issue 6 by bwanama...@gmail.com: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

I tried to compile readline 6.2.2 using third party library but it says
import error cannot load library find library 1226 : 7498 readline.so
failed to load previously.

python-fo...@googlecode.com

unread,
Dec 28, 2012, 11:28:03 PM12/28/12
to python-fo...@googlegroups.com

Comment #7 on issue 6 by cr0...@gmail.com: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

any update for readline support on python 2.x?

python-fo...@googlecode.com

unread,
Dec 29, 2012, 3:19:00 AM12/29/12
to python-fo...@googlegroups.com

Comment #8 on issue 6 by bwanama...@gmail.com: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

I compiled libreadline.so and libhitory.so for Android using c4droid (not
ndk!), and checked them with Python-ctypes, and they work. To compile
readline, on Bionic, a patch is necessary for systems without setpwent,
which I got from this bug report [1]. The shared object libraries are
attached here as "rl-6.2_arm_linux_androideabi.tar", & the patch is also
attached as "readline-6.2-complete.c.patch". Unfortunately I was not able
to compile a working "readline.so" from the Python-readline-6.2.4.1
package; I always got "library not found"/"failed to load previously"
errors. However, I am working on a pure (Python only) wrapper for the
shared object libraries using Python-ctypes that is closely based on
Python-readline. It is called "purereadline" [2] and is hosted on github. I
hope when it is completed it will work or I'll be very bummed. FYI: I can't
think of any reason that the Python-readline package shouldn't work except
that I am too lazy to actually build Python for Andriod, and so have valid
python.h and pyconfig.h files. It would be very nice if future "Python for
Android" versions had a "dev" download that included the headers necessary
to build extensions.

[1] http://lists.gnu.org/archive/html/bug-readline/2012-09/msg00001.html
[2] https://github.com/mikofski/purereadline


Attachments:
rl-6.2_arm_linux_androideabi.tar 429 KB
readline-6.2-complete.c.patch 356 bytes

python-fo...@googlecode.com

unread,
Dec 29, 2012, 3:52:54 AM12/29/12
to python-fo...@googlegroups.com

Comment #9 on issue 6 by anthony....@gmail.com: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

See readline build Robbie did for Python 3, this should be easy to port on
android-python27, unfortunately I have no time to do this right now but is
in my todo. Let me know if you succeed and would like to commit your code
in the project.

python-fo...@googlecode.com

unread,
Jan 8, 2013, 1:30:19 PM1/8/13
to python-fo...@googlegroups.com

Comment #10 on issue 6 by bwanama...@gmail.com: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

The pure-python readline code is on github, but it is still about 100 lines
and some testing short of being ready.

http://poquitopicante.blogspot.com/2013/01/purereadline.html

python-fo...@googlecode.com

unread,
Feb 4, 2013, 2:02:39 PM2/4/13
to python-fo...@googlegroups.com

Comment #11 on issue 6 by haris...@gmail.com: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

Hai, Finally I compiled a working readline module for python2.7.3
The attached file is can be applied to original python2.7.3.tar.gz

But I only compiled python ,readline , and ncurses.So there are lot of
modules which is un available .includes ctypes. Because I concentrated on
readline.

I used gdb sever to debug python shared libs. It is a great tool.

I choose python2.7.3 because I couldnot get the source file which
correspond to python_r16.zip available at Download section.This version
contains almost all module except readline.
Here I have only readline module.

So any one can post headers corresponding to python_r16.zip.

Sorry for my language.

Attachments:
Python2.7.3_android-basic.diff 58.8 KB

python-fo...@googlecode.com

unread,
Feb 6, 2013, 1:29:30 PM2/6/13
to python-fo...@googlegroups.com

Comment #12 on issue 6 by haris...@gmail.com: adding readline module
http://code.google.com/p/python-for-android/issues/detail?id=6

Hai ,
This the reppo for python2.7.3 with readline support
https://github.com/harish2704/android-python2.7.3

python-fo...@googlecode.com

unread,
Apr 23, 2015, 6:54:38 AM4/23/15
to python-fo...@googlegroups.com

Comment #13 on issue 6 by chasel...@gmail.com: adding readline module
https://code.google.com/p/python-for-android/issues/detail?id=6

I finally got readline working for the KBOX environment port of Python
3.5.x thanks to the patch posted here plus a couple of post-configure hacks
to the shlib/Makefile.

For reference purposes, the "issue" is being tracked here:
http://bugs.python.org/issue23496. Once I figure out where or if to submit
readline stuff, I'll post the link here as well

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

Shimoda

unread,
May 16, 2015, 4:24:39 AM5/16/15
to python-fo...@googlegroups.com, codesite...@google.com, python-fo...@googlecode.com
Hi,
I enabled readline module for python 2.7.9.
patch https://bugs.python.org/issue21390 was also needed.

https://github.com/kuri65536/python-for-android/releases/tag/r24

But python 3.4 is not yet.
Thank you.
Reply all
Reply to author
Forward
0 new messages