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.
On 24/10/06, Will McDonald <wmcdonald at gmail.com> wrote:> 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..Gah, ignore me ladies and gents. I'm being dense. :) [wmcdonald at willspc demos]$ cd /usr/share/doc/python-paramiko-1.6.3/demos/ [wmcdonald at willspc demos]$ ls interactive.py interactive.py [wmcdonald at willspc demos]$ python Python 2.3.4 (#1, Mar 10 2006, 06:12:09) [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information.>>> import interactive >>> dir(interactive)['__builtins__', '__doc__', '__file__', '__name__', 'has_termios', 'interactive_shell', 'posix_shell', 'socket', 'sys', 'termios', 'tty', 'windows_shell']>>>Will.