Write the unicode string ``s`` to the pseudoterminal. This intends to make tests a little less verbose. Returns the number of bytes written.
(self, s)
| 150 | return s |
| 151 | |
| 152 | def write(self, s): |
| 153 | """Write the unicode string ``s`` to the pseudoterminal. |
| 154 | This intends to make tests a little less verbose. |
| 155 | |
| 156 | Returns the number of bytes written. |
| 157 | """ |
| 158 | if isinstance(s, basestring): |
| 159 | b = s.encode(self.encoding) |
| 160 | count = super(SimplePty, self).write(b) |
| 161 | return count |
| 162 | |
| 163 | def writeline(self, s): |
| 164 | """Syntactic sugar to add a '\n' at the end of the . |
no outgoing calls