[Tutor] command line

dman dman@dman.ddts.net
Mon, 1 Apr 2002 20:42:30 -0600


On Sun, Mar 31, 2002 at 09:42:03PM -0500, Erik Price wrote:
| 
| On Sunday, March 31, 2002, at 04:45  PM, dman wrote:
| 
| >I see you're using "Apple Mail".  Are you on OSX?  If so fire up a
| >shell and try
| >    ldd `which python`
| 
| Hmm... no go; a search shows that 'ldd' isn't installed on my system.  
| I've actually never heard of that command.
 
[from the manpage]
DESCRIPTION
   ldd prints the shared libraries required by each program or shared
   library specified on the command line.

On my debian system it is part of the 'libc6' package.  Just for your
edification, here's what it outputs on my system.

$ ldd /usr/bin/python2.
    libpython2.2.so.0.0 => /usr/lib/libpython2.2.so.0.0 (0x40020000)
    libdl.so.2 => /lib/libdl.so.2 (0x400ed000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x400f1000)
    libutil.so.1 => /lib/libutil.so.1 (0x40107000)
    libm.so.6 => /lib/libm.so.6 (0x4010a000)
    libc.so.6 => /lib/libc.so.6 (0x4012c000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Must be dynamically loaded via dlopen().  ldd isn't going to help you
with this one.

| >and see if "libreadline" is mentioned anywhere in the output.  My
| >guess is that it won't be.  GNU readline is a library (made by the GNU
| >folks) for reading a lines of input from a terminal.  bash uses it and
| >python _can_ use it if it was compiled with it.  This is what gives
| >command history and line editing with emacs or vi style keybindings.
| >The default for readline is 'emacs' style.
| 
| Hm... oh well, I'm positive that I didn't specify emacs as a ./configure 
| parameter when I compiled Python.

Two things :
    you specify inclusion of the readline module (not emacs)
    python doesn't use autoconf (./configure), instead you need to
        uncomment the proper line in Modules/Setup (I think is the
        filename)

| I'll have to recompile.  No big deal, I just need some time to do
| it.  Thanks for the tip dman.

You're welcome.

-D

-- 

Better a little with righteousness
than much gain with injustice.
        Proverbs 16:8