Skip to content

Commit

Permalink
Fixed raczben#61
Browse files Browse the repository at this point in the history
The EOF character is formatted differently in Windows.
  • Loading branch information
Stefanhg committed Sep 30, 2023
1 parent 2168ff3 commit d81ffa0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wexpect/wexpect_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
The command line argument parsers, and the Exceptions placed here.
"""

import platform
import re
import traceback
import sys
Expand All @@ -16,7 +16,10 @@
import signal

# platform does not define VEOF so assume CTRL-D
EOF_CHAR = b'\x04'
if platform.uname().system == "Windows":
EOF_CHAR = b'^D'
else:
EOF_CHAR = b'\x04'

SIGNAL_CHARS = {
signal.SIGTERM: b'\x011', # Device control 1
Expand Down

0 comments on commit d81ffa0

Please sign in to comment.