Skip to content

Commit

Permalink
utf8 stdin/stdout in interact and echo_w_prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
jquast committed Nov 27, 2014
1 parent 17248d5 commit ad1daab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/echo_w_prompt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# -*- coding: utf-8 -*-
from __future__ import print_function
import codecs
import sys

sys.stdout = codecs.getwriter('utf8')(sys.stdout)
sys.stderr = codecs.getwriter('utf8')(sys.stderr)


try:
raw_input
Expand Down
4 changes: 4 additions & 0 deletions tests/interact_unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@

from utils import no_coverage_env
import pexpect
import codecs
import sys

sys.stdout = codecs.getwriter('utf8')(sys.stdout)
sys.stderr = codecs.getwriter('utf8')(sys.stderr)


def main():
p = pexpect.spawnu(sys.executable + ' echo_w_prompt.py',
Expand Down

0 comments on commit ad1daab

Please sign in to comment.