Re: Having trouble with python readline

2013-02-11 Thread Scott Webster
So, if I add the readline directory to my sys.path then it works:

i.e. sys.path.append(/opt/local/lib/python2.5/site-packages/readline)

I also notice that there is this file:
/opt/local/lib/python2.5/site-packages/readline_path.py which seems to
contain code to add that directory to the sys.path if you have a
lib-dynload path already defined in the sys.path list.

However, it is looking for a path at /opt/local/lib/... etc.  My sys.path
goes through a /opt/local/Library/Frameworks/... symlink.

So, if this readline_path.py file were actually being executed at some
useful time, it wouldn't work because the string it has does not match my
sys.path.

I would have just thought that installing py25-readline would add the
correct readline directory to the sys.path for python.

Scott


On Sat, Feb 9, 2013 at 12:15 AM, Scott Webster sewebs...@gmail.com wrote:

 swim:~ swebster$ port -v installed python25 py25-readline
 The following ports are currently installed:
   py25-readline @6.2.2_0 (active) platform='darwin 12' archs='x86_64'
   python25 @2.5.6_4 (active) platform='darwin 12' archs='x86_64'
 swim:~ swebster$  lipo -info /opt/local/bin/python2.5
 /opt/local/lib/python2.5/site-packages/readline/readline.so
 Non-fat file: /opt/local/bin/python2.5 is architecture: x86_64
 Non-fat file: /opt/local/lib/python2.5/site-packages/readline/readline.so
 is architecture: x86_64


 On Sat, Feb 9, 2013 at 12:10 AM, Ryan Schmidt ryandes...@macports.orgwrote:


 On Feb 9, 2013, at 01:17, Scott Webster wrote:

  I have python25 and py25-readline installed.  python25 is set to be
 default with port select.  But I can't import readline.  Am I missing
 something simple here?
 
  Thanks for any advice!
 
 
  swim:~ swebster$ port installed python25 py25-readline
  The following ports are currently installed:
py25-readline @6.2.2_0 (active)
python25 @2.5.6_4 (active)
  swim:~ swebster$ port select --show python
  The currently selected version for 'python' is 'python25'.
  swim:~ swebster$ python
  Python 2.5.6 (r256:88840, Nov 18 2012, 05:37:10)
  [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))]
 on darwin
  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
  

 Works fine for me. Are python25 and py25-readline installed for the same
 architecture(s)? What do you get for:

 $ port -v installed python25 py25-readline
 $ lipo -info /opt/local/bin/python2.5
 /opt/local/lib/python2.5/site-packages/readline/readline.so






___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Having trouble with python readline

2013-02-09 Thread Scott Webster
swim:~ swebster$ port -v installed python25 py25-readline
The following ports are currently installed:
  py25-readline @6.2.2_0 (active) platform='darwin 12' archs='x86_64'
  python25 @2.5.6_4 (active) platform='darwin 12' archs='x86_64'
swim:~ swebster$  lipo -info /opt/local/bin/python2.5
/opt/local/lib/python2.5/site-packages/readline/readline.so
Non-fat file: /opt/local/bin/python2.5 is architecture: x86_64
Non-fat file: /opt/local/lib/python2.5/site-packages/readline/readline.so
is architecture: x86_64


On Sat, Feb 9, 2013 at 12:10 AM, Ryan Schmidt ryandes...@macports.orgwrote:


 On Feb 9, 2013, at 01:17, Scott Webster wrote:

  I have python25 and py25-readline installed.  python25 is set to be
 default with port select.  But I can't import readline.  Am I missing
 something simple here?
 
  Thanks for any advice!
 
 
  swim:~ swebster$ port installed python25 py25-readline
  The following ports are currently installed:
py25-readline @6.2.2_0 (active)
python25 @2.5.6_4 (active)
  swim:~ swebster$ port select --show python
  The currently selected version for 'python' is 'python25'.
  swim:~ swebster$ python
  Python 2.5.6 (r256:88840, Nov 18 2012, 05:37:10)
  [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on
 darwin
  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
  

 Works fine for me. Are python25 and py25-readline installed for the same
 architecture(s)? What do you get for:

 $ port -v installed python25 py25-readline
 $ lipo -info /opt/local/bin/python2.5
 /opt/local/lib/python2.5/site-packages/readline/readline.so





___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Having trouble with python readline

2013-02-08 Thread Scott Webster
I have python25 and py25-readline installed.  python25 is set to be default
with port select.  But I can't import readline.  Am I missing something
simple here?

Thanks for any advice!


swim:~ swebster$ port installed python25 py25-readline
The following ports are currently installed:
  py25-readline @6.2.2_0 (active)
  python25 @2.5.6_4 (active)
swim:~ swebster$ port select --show python
The currently selected version for 'python' is 'python25'.
swim:~ swebster$ python
Python 2.5.6 (r256:88840, Nov 18 2012, 05:37:10)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on
darwin
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

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users