public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Python+readline?
@ 2012-01-28  9:01 Walter Dnes
  2012-01-28 22:33 ` [gentoo-user] Python+readline? walt
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Walter Dnes @ 2012-01-28  9:01 UTC (permalink / raw
  To: Gentoo Users List

  I've enabled the readline flag for the python build, but it doesn't
seem to work.  Are there any other settings I'm missing?

-- 
Walter Dnes <waltdnes@waltdnes.org>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [gentoo-user] Re: Python+readline?
  2012-01-28  9:01 [gentoo-user] Python+readline? Walter Dnes
@ 2012-01-28 22:33 ` walt
  2012-01-28 23:11 ` [gentoo-user] Python+readline? Daniel Troeder
  2012-01-30  6:42 ` Keith Dart
  2 siblings, 0 replies; 12+ messages in thread
From: walt @ 2012-01-28 22:33 UTC (permalink / raw
  To: gentoo-user

On 01/28/2012 01:01 AM, Walter Dnes wrote:
>   I've enabled the readline flag for the python build, but it doesn't
> seem to work.

I see that my python has the readline flag set, but I don't know what it
does so I don't know if it's working.  How can I tell?





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Python+readline?
  2012-01-28  9:01 [gentoo-user] Python+readline? Walter Dnes
  2012-01-28 22:33 ` [gentoo-user] Python+readline? walt
@ 2012-01-28 23:11 ` Daniel Troeder
  2012-01-30  6:42 ` Keith Dart
  2 siblings, 0 replies; 12+ messages in thread
From: Daniel Troeder @ 2012-01-28 23:11 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

On 28.01.2012 10:01, Walter Dnes wrote:
>   I've enabled the readline flag for the python build, but it doesn't
> seem to work.  Are there any other settings I'm missing?
> 
daniel@moja ~ $ cat .pythonstartup
#!/usr/bin/python
try:
    import readline
except ImportError:
    print "Module readline not available."
else:
    import rlcompleter
    readline.parse_and_bind("tab: complete")


-- 
PGP key @ http://pgpkeys.pca.dfn.de/pks/lookup?search=0xBB9D4887&op=get
# gpg --recv-keys --keyserver hkp://subkeys.pgp.net 0xBB9D4887


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Python+readline?
  2012-01-28  9:01 [gentoo-user] Python+readline? Walter Dnes
  2012-01-28 22:33 ` [gentoo-user] Python+readline? walt
  2012-01-28 23:11 ` [gentoo-user] Python+readline? Daniel Troeder
@ 2012-01-30  6:42 ` Keith Dart
  2012-01-30  7:25   ` Walter Dnes
  2 siblings, 1 reply; 12+ messages in thread
From: Keith Dart @ 2012-01-30  6:42 UTC (permalink / raw
  To: gentoo-user; +Cc: waltdnes

On Sat, 28 Jan 2012 04:01:40 -0500
"Walter Dnes" <waltdnes@waltdnes.org> wrote:

>   I've enabled the readline flag for the python build, but it doesn't
> seem to work.  Are there any other settings I'm missing?
> 

What happens when you "import readline" ?


-- 

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Keith Dart <keith@dartworks.biz>
   public key: ID: 19017044
   <http://www.dartworks.biz/>
   =====================================================================



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Python+readline?
  2012-01-30  6:42 ` Keith Dart
@ 2012-01-30  7:25   ` Walter Dnes
  2012-01-30  9:38     ` Keith Dart
  0 siblings, 1 reply; 12+ messages in thread
From: Walter Dnes @ 2012-01-30  7:25 UTC (permalink / raw
  To: gentoo-user

On Sun, Jan 29, 2012 at 10:42:47PM -0800, Keith Dart wrote
> On Sat, 28 Jan 2012 04:01:40 -0500
> "Walter Dnes" <waltdnes@waltdnes.org> wrote:
> 
> >   I've enabled the readline flag for the python build, but it doesn't
> > seem to work.  Are there any other settings I'm missing?
> > 
> 
> What happens when you "import readline" ?

waltdnes@d530 ~ $ python
Python 2.7.2 (default, Dec 14 2011, 00:09:44) 
[GCC 4.5.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named readline
>>> 


-- 
Walter Dnes <waltdnes@waltdnes.org>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Python+readline?
  2012-01-30  7:25   ` Walter Dnes
@ 2012-01-30  9:38     ` Keith Dart
  2012-01-31  3:38       ` Walter Dnes
  2012-01-31  8:17       ` [gentoo-user] [SOLVED] Python+readline? Walter Dnes
  0 siblings, 2 replies; 12+ messages in thread
From: Keith Dart @ 2012-01-30  9:38 UTC (permalink / raw
  To: gentoo-user; +Cc: waltdnes

On Mon, 30 Jan 2012 02:25:30 -0500
"Walter Dnes" <waltdnes@waltdnes.org> wrote:

> On Sun, Jan 29, 2012 at 10:42:47PM -0800, Keith Dart wrote
> > On Sat, 28 Jan 2012 04:01:40 -0500
> > "Walter Dnes" <waltdnes@waltdnes.org> wrote:
> > 
> > >   I've enabled the readline flag for the python build, but it
> > > doesn't seem to work.  Are there any other settings I'm missing?
> > > 
> > 
> > What happens when you "import readline" ?
> 
> waltdnes@d530 ~ $ python
> Python 2.7.2 (default, Dec 14 2011, 00:09:44) 
> [GCC 4.5.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import readline
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named readline
> >>> 
> 
> 

ok, how about the output of:

emerge -pv dev-lang/python:2.7

Did you do something with the readline library?


-- 

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Keith Dart <keith@dartworks.biz>
   public key: ID: 19017044
   <http://www.dartworks.biz/>
   =====================================================================



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Python+readline?
  2012-01-30  9:38     ` Keith Dart
@ 2012-01-31  3:38       ` Walter Dnes
  2012-01-31  6:15         ` Pandu Poluan
  2012-01-31  8:18         ` Keith Dart
  2012-01-31  8:17       ` [gentoo-user] [SOLVED] Python+readline? Walter Dnes
  1 sibling, 2 replies; 12+ messages in thread
From: Walter Dnes @ 2012-01-31  3:38 UTC (permalink / raw
  To: gentoo-user

On Mon, Jan 30, 2012 at 01:38:53AM -0800, Keith Dart wrote

> ok, how about the output of:
> 
> emerge -pv dev-lang/python:2.7
> 
> Did you do something with the readline library?

  I hate multi-slot.  I added readline to dev-lang/python in
/etc/portage/package.use, and then ran "emerge -1 python"... which
proceeded to update python 3.1, but *NOT* python 2.7.  After I did...

emerge -1 =dev-lang/python-2.7.2-r3 =dev-lang/python-3.1.4-r3

I got the same error, even after rebuilding.

=============================================================
waltdnes@d530 ~ $ emerge -pv python:2.7

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-lang/python-2.7.2-r3  USE="readline ssl threads (wide-unicode) xml -berkdb -build -doc -examples -gdbm -ipv6 -ncurses -sqlite -tk -wininst" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
waltdnes@d530 ~ $ python
Python 2.7.2 (default, Jan 30 2012, 19:42:20) 
[GCC 4.5.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named readline
>>>
=============================================================

  The emerge output shows that python would be replaced, and that the
"readline" USE flag has been set on the previous merge.  I also ran
revdep-rebuild, and it found nothing.  The python command "modules",
from inside the interactive "help()" command shows a ton of modules, but
not "readline".  Now what?

-- 
Walter Dnes <waltdnes@waltdnes.org>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Python+readline?
  2012-01-31  3:38       ` Walter Dnes
@ 2012-01-31  6:15         ` Pandu Poluan
  2012-01-31  8:18         ` Keith Dart
  1 sibling, 0 replies; 12+ messages in thread
From: Pandu Poluan @ 2012-01-31  6:15 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1754 bytes --]

On Jan 31, 2012 10:43 AM, "Walter Dnes" <waltdnes@waltdnes.org> wrote:
>
> On Mon, Jan 30, 2012 at 01:38:53AM -0800, Keith Dart wrote
>
> > ok, how about the output of:
> >
> > emerge -pv dev-lang/python:2.7
> >
> > Did you do something with the readline library?
>
>  I hate multi-slot.  I added readline to dev-lang/python in
> /etc/portage/package.use, and then ran "emerge -1 python"... which
> proceeded to update python 3.1, but *NOT* python 2.7.  After I did...
>
> emerge -1 =dev-lang/python-2.7.2-r3 =dev-lang/python-3.1.4-r3
>
> I got the same error, even after rebuilding.
>
> =============================================================
> waltdnes@d530 ~ $ emerge -pv python:2.7
>
> These are the packages that would be merged, in order:
>
> Calculating dependencies... done!
> [ebuild   R    ] dev-lang/python-2.7.2-r3  USE="readline ssl threads
(wide-unicode) xml -berkdb -build -doc -examples -gdbm -ipv6 -ncurses
-sqlite -tk -wininst" 0 kB
>
> Total: 1 package (1 reinstall), Size of downloads: 0 kB
> waltdnes@d530 ~ $ python
> Python 2.7.2 (default, Jan 30 2012, 19:42:20)
> [GCC 4.5.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import readline
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> ImportError: No module named readline
> >>>
> =============================================================
>
>  The emerge output shows that python would be replaced, and that the
> "readline" USE flag has been set on the previous merge.  I also ran
> revdep-rebuild, and it found nothing.  The python command "modules",
> from inside the interactive "help()" command shows a ton of modules, but
> not "readline".  Now what?
>

Have you run python-updater?

Rgds,

[-- Attachment #2: Type: text/html, Size: 2358 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [gentoo-user] [SOLVED] Python+readline?
  2012-01-30  9:38     ` Keith Dart
  2012-01-31  3:38       ` Walter Dnes
@ 2012-01-31  8:17       ` Walter Dnes
  2012-01-31 16:07         ` Walter Dnes
  1 sibling, 1 reply; 12+ messages in thread
From: Walter Dnes @ 2012-01-31  8:17 UTC (permalink / raw
  To: gentoo-user

On Mon, Jan 30, 2012 at 01:38:53AM -0800, Keith Dart wrote
> 
> ok, how about the output of:
> 
> emerge -pv dev-lang/python:2.7
> 
> Did you do something with the readline library?

  I never had it installed!!!  I assumed that including the line...

dev-lang/python readline ssl xml

...in /etc/portage/package.use would cause sys-libs/readline to be
automatically pulled in when building python.  WRONG!!!  Once I
explicitly built sys-libs/readline, then python built against it and
up-arrow/left-arrow/right-arrow works just like in bash.  I emerged
readline with "-1", which doesn't enter it into world.  And
"emerge -pv --depclean sys-libs/readline" wants to remove readline.
I'll file a bug in bugzilla later today.

-- 
Walter Dnes <waltdnes@waltdnes.org>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Python+readline?
  2012-01-31  3:38       ` Walter Dnes
  2012-01-31  6:15         ` Pandu Poluan
@ 2012-01-31  8:18         ` Keith Dart
  1 sibling, 0 replies; 12+ messages in thread
From: Keith Dart @ 2012-01-31  8:18 UTC (permalink / raw
  To: gentoo-user; +Cc: waltdnes

On Mon, 30 Jan 2012 22:38:55 -0500
"Walter Dnes" <waltdnes@waltdnes.org> wrote:

>   The emerge output shows that python would be replaced, and that the
> "readline" USE flag has been set on the previous merge.  I also ran
> revdep-rebuild, and it found nothing.  The python command "modules",
> from inside the interactive "help()" command shows a ton of modules,
> but not "readline".  Now what?

That's very odd.

Try this:

$ find /usr/lib/python2.7 -name "readline*" -print

And see if you get this:

/usr/lib/python2.7/lib-dynload/readline.so


also, "which python", in case you might have another one installed...

and what is sys.path?

Does sys.path contain '/usr/lib64/python2.7/lib-dynload'?



-- 

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Keith Dart <keith@dartworks.biz>
   public key: ID: 19017044
   <http://www.dartworks.biz/>
   =====================================================================



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] [SOLVED] Python+readline?
  2012-01-31  8:17       ` [gentoo-user] [SOLVED] Python+readline? Walter Dnes
@ 2012-01-31 16:07         ` Walter Dnes
  2012-02-01  6:21           ` Walter Dnes
  0 siblings, 1 reply; 12+ messages in thread
From: Walter Dnes @ 2012-01-31 16:07 UTC (permalink / raw
  To: gentoo-user

On Tue, Jan 31, 2012 at 03:17:09AM -0500, Walter Dnes wrote

> I'll file a bug in bugzilla later today.

  Bug https://bugs.gentoo.org/show_bug.cgi?id=401651 filed.

-- 
Walter Dnes <waltdnes@waltdnes.org>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] [SOLVED] Python+readline?
  2012-01-31 16:07         ` Walter Dnes
@ 2012-02-01  6:21           ` Walter Dnes
  0 siblings, 0 replies; 12+ messages in thread
From: Walter Dnes @ 2012-02-01  6:21 UTC (permalink / raw
  To: gentoo-user

On Tue, Jan 31, 2012 at 11:07:56AM -0500, Walter Dnes wrote
> On Tue, Jan 31, 2012 at 03:17:09AM -0500, Walter Dnes wrote
> 
> > I'll file a bug in bugzilla later today.
> 
>   Bug https://bugs.gentoo.org/show_bug.cgi?id=401651 filed.

  A bit more looking at the ebuild, and more testing, reveals that you
must have both the "ncurses" and "readline" USE flags set in order to
for python to pull in sys-libs/readline.  Note that it will build
against a previously loaded sys-libs/readline if only the "readline"
flag is set, but it will not pull in the sys-libs/readline package.

-- 
Walter Dnes <waltdnes@waltdnes.org>



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-02-01  6:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-28  9:01 [gentoo-user] Python+readline? Walter Dnes
2012-01-28 22:33 ` [gentoo-user] Python+readline? walt
2012-01-28 23:11 ` [gentoo-user] Python+readline? Daniel Troeder
2012-01-30  6:42 ` Keith Dart
2012-01-30  7:25   ` Walter Dnes
2012-01-30  9:38     ` Keith Dart
2012-01-31  3:38       ` Walter Dnes
2012-01-31  6:15         ` Pandu Poluan
2012-01-31  8:18         ` Keith Dart
2012-01-31  8:17       ` [gentoo-user] [SOLVED] Python+readline? Walter Dnes
2012-01-31 16:07         ` Walter Dnes
2012-02-01  6:21           ` Walter Dnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox