[CentOS] python-interactive for CentOS/EL 4

Tue Oct 24 09:18:11 UTC 2006
Will McDonald <wmcdonald at gmail.com>

Hi all,

Could anyone point me in the right direction for a package that
provides the 'interactive' module for Python? I need to do some SSH
stuff in Python so I grabbed python-paramiko from RPMForge (as always,
thanks Dag & co.). Paramiko appears to be dependent on python-crypto
but the RPM doesn't require it..

[wmcdonald at willspc ssh]$ ./demo.py
Traceback (most recent call last):
  File "./demo.py", line 33, in ?
    import paramiko
  File "/usr/lib/python2.3/site-packages/paramiko/__init__.py", line 69, in ?
    from transport import randpool, SecurityOptions, Transport
  File "/usr/lib/python2.3/site-packages/paramiko/transport.py", line 32, in ?
    from paramiko import util
  File "/usr/lib/python2.3/site-packages/paramiko/util.py", line 31, in ?
    from paramiko.common import *
  File "/usr/lib/python2.3/site-packages/paramiko/common.py", line 99, in ?
    from Crypto.Util.randpool import PersistentRandomPool, RandomPool
ImportError: No module named Crypto.Util.randpool

So I've grabbed python-crypto from RPMForge too and now I appear to
need python-interactive or similar...

[wmcdonald at willspc ssh]$ ./demo.py
Traceback (most recent call last):
  File "./demo.py", line 34, in ?
    import interactive
ImportError: No module named interactive

The import causing the problem is...

import paramiko
import interactive

And the code snippet where interactive is used is...

    chan = t.open_session()
    chan.get_pty()
    chan.invoke_shell()
    print '*** Here we go!'
    print
    interactive.interactive_shell(chan)
    chan.close()
    t.close()

I've Googled a bit but "python", "module" and "interactive" generally
return about a million results all relating to alternative
interpreter/CLIs.

This is all vanilla setup other than the RPMForge bits.

[wmcdonald at willspc ssh]$ rpm -q python
python-2.3.4-14.2
[wmcdonald at willspc ssh]$ rpm -q python-paramiko python-crypto
python-paramiko-1.6.3-1.el4.rf
python-crypto-2.0-1.2.el4.rf

Will.