maybe i found why pexpect doesn't work in my environment. (but still, i don't know how solve it)
my machine is actually a xen domain U, whose kernel is host's kernel. when I test pexpect module directly on host machine, it works pretty fine. and that's all I can do about it, maybe pexpect use pseudo-terminal, and domain U doesn't support this well. maybe nobody here has encountered this problem before, and i write here just for everyone's information. On Fri, Nov 5, 2010 at 2:46 PM, dachuan <hdc1...@gmail.com> wrote: > hi, everyone. > When I use Pexpect Module, I met the following problem and don't know how > to handle it. > Any advice is appreciated ! > > My environment: > Linux node08_xen3.4.3_rhel5_1 2.6.18.8-xen #1 SMP Wed Jul 14 17:20:01 CST > 2010 i686 i686 i386 GNU/Linux (FYI: this is a virtual machine.) > Python 2.5.5 > > and by the way, I have installed pexpect in another machine, and it works > pretty well, its environment is: > Linux WEB1 2.6.9-42.ELlargesmp #1 SMP Wed Jul 12 23:46:39 EDT 2006 x86_64 > x86_64 x86_64 GNU/Linux > Python 2.5.5 > > > -bash-3.1$ ./ssh_mutual_trust.py -n > Traceback (most recent call last): > File "./ssh_mutual_trust.py", line 427, in <module> > start(sys.argv[1:]) > File "./ssh_mutual_trust.py", line 405, in start > sshkeygen() > File "./ssh_mutual_trust.py", line 137, in sshkeygen > keygen_child = pexpect.spawn(new_keygen_cmd) > File "/usr/local/lib/python2.5/site-packages/pexpect.py", line 430, in > __init__ > self._spawn (command, args) > File "/usr/local/lib/python2.5/site-packages/pexpect.py", line 530, in > _spawn > raise ExceptionPexpect('Error! pty.fork() failed: ' + str(e)) > pexpect.ExceptionPexpect: Error! pty.fork() failed: out of pty devices > -bash-3.1$ > > > -- > Dachuan Huang, Graduate Candidate > ----------------------------------------------------------- > Cluster and Grid Computing Lab > Services Computing Technology and System Lab > Huazhong University of Science and Technology > Wuhan, 430074, China > Tel: +86-15902733227 > > Email: hdc1...@gmail.com > -- Dachuan Huang, Graduate Candidate ----------------------------------------------------------- Cluster and Grid Computing Lab Services Computing Technology and System Lab Huazhong University of Science and Technology Wuhan, 430074, China Tel: +86-15902733227 Email: hdc1...@gmail.com
-- http://mail.python.org/mailman/listinfo/python-list