maybe i found why pexpect doesn't work in my environment. (but still, i don't know how solve it)<br><br>my machine is actually a xen domain U, whose kernel is host's kernel.<br><br>when I test pexpect module directly on host machine, it works pretty fine. <br>
<br>and that's all I can do about it, maybe pexpect use pseudo-terminal, and domain U doesn't support this well.<br><br>maybe nobody here has encountered this problem before, and i write here just for everyone's information.<br>
<br><div class="gmail_quote">On Fri, Nov 5, 2010 at 2:46 PM, dachuan <span dir="ltr"><<a href="mailto:hdc1112@gmail.com">hdc1112@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
hi, everyone. <br>When I use Pexpect Module, I met the following problem and don't know how to handle it. <br>Any advice is appreciated !<br><br>My environment:<br>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.)<br>

Python 2.5.5<br><br>and by the way, I have installed pexpect in another machine, and it works pretty well, its environment is:<br>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<br>

Python 2.5.5<br><br><br>-bash-3.1$ ./ssh_mutual_trust.py -n<br>Traceback (most recent call last):<br>  File "./ssh_mutual_trust.py", line 427, in <module><br>    start(sys.argv[1:])<br>  File "./ssh_mutual_trust.py", line 405, in start<br>

    sshkeygen()<br>  File "./ssh_mutual_trust.py", line 137, in sshkeygen<br>    keygen_child = pexpect.spawn(new_keygen_cmd)<br>  File "/usr/local/lib/python2.5/site-packages/pexpect.py", line 430, in __init__<br>

    self._spawn (command, args)<br>  File "/usr/local/lib/python2.5/site-packages/pexpect.py", line 530, in _spawn<br>    raise ExceptionPexpect('Error! pty.fork() failed: ' + str(e))<br>pexpect.ExceptionPexpect: Error! pty.fork() failed: out of pty devices<br>

-bash-3.1$<br><br clear="all"><br>-- <br>Dachuan Huang, Graduate Candidate<br>-----------------------------------------------------------<br>Cluster and Grid Computing Lab<br>Services Computing Technology and System Lab<br>

Huazhong University of Science and Technology<br>Wuhan, 430074, China<br>Tel: +86-15902733227<br> <br>Email: <a href="mailto:hdc1112@gmail.com" target="_blank">hdc1112@gmail.com</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Dachuan Huang, Graduate Candidate<br>-----------------------------------------------------------<br>Cluster and Grid Computing Lab<br>Services Computing Technology and System Lab<br>
Huazhong University of Science and Technology<br>Wuhan, 430074, China<br>Tel: +86-15902733227<br> <br>Email: <a href="mailto:hdc1112@gmail.com">hdc1112@gmail.com</a><br>