Skip to content

Commit

Permalink
python2 python3 compatible for input() function
Browse files Browse the repository at this point in the history
  • Loading branch information
kirohy committed Jun 13, 2024
1 parent e570f43 commit f07ba6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sample/SampleRobot/samplerobot_emergency_stopper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
import socket
import time

if hasattr(__builtins__, 'raw_input'):
input = raw_input

def init ():
global hcf, init_pose, reset_pose, wrench_command0, wrench_command1, hrpsys_version
hcf = HrpsysConfigurator()
Expand Down
3 changes: 3 additions & 0 deletions src/hrpsys/waitInput.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import builtins
import threading

if hasattr(__builtins__, 'raw_input'):
input = raw_input

def waitInputConfirm(msg):
root = None
try:
Expand Down

0 comments on commit f07ba6a

Please sign in to comment.