| OLD | NEW |
| 1 """This is like pexpect, but will work on any file descriptor that you pass it. | 1 """This is like pexpect, but will work on any file descriptor that you pass it. |
| 2 So you are reponsible for opening and close the file descriptor. | 2 You are reponsible for opening and close the file descriptor. |
| 3 | 3 |
| 4 $Id: fdpexpect.py 505 2007-12-26 21:33:50Z noah $ | 4 PEXPECT LICENSE |
| 5 |
| 6 This license is approved by the OSI and FSF as GPL-compatible. |
| 7 http://opensource.org/licenses/isc-license.txt |
| 8 |
| 9 Copyright (c) 2012, Noah Spurrier <noah@noah.org> |
| 10 PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY |
| 11 PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE |
| 12 COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES. |
| 13 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 14 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 15 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 16 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 17 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 18 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 19 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 20 |
| 5 """ | 21 """ |
| 6 | 22 |
| 7 from pexpect import * | 23 from pexpect import * |
| 8 import os | 24 import os |
| 9 | 25 |
| 10 __all__ = ['fdspawn'] | 26 __all__ = ['fdspawn'] |
| 11 | 27 |
| 12 class fdspawn (spawn): | 28 class fdspawn (spawn): |
| 13 | 29 |
| 14 """This is like pexpect.spawn but allows you to supply your own open file | 30 """This is like pexpect.spawn but allows you to supply your own open file |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 return False | 89 return False |
| 74 | 90 |
| 75 def terminate (self, force=False): | 91 def terminate (self, force=False): |
| 76 | 92 |
| 77 raise ExceptionPexpect ('This method is not valid for file descriptors.'
) | 93 raise ExceptionPexpect ('This method is not valid for file descriptors.'
) |
| 78 | 94 |
| 79 def kill (self, sig): | 95 def kill (self, sig): |
| 80 | 96 |
| 81 return | 97 return |
| 82 | 98 |
| OLD | NEW |