I'm trying to call ct-ng (http://crosstool-ng.org/) from a SCons SConstruct script, so basically from Python.
using the following method:
ret = subprocess.call(["/mnt/build/pw_build/crosstool-ng/bin/ct-ng menuconfig"], env=env_cross,shell=True)
crosstool-ng uses ncurses to present the user with a menu:
Unfortunately when trying to navigate the menus I get:
Using cat to display the sequences when using the arrow keys I see:
:/mnt/build$ cat > /dev/null
^[OA^[OD^[OB^[OC^[OA^[OB^[OD^[OC^[OA^[OB
It seems like something is possibly stripping the escape characters from the sequence.
When I call the ct-ng script from the command line in the terminal it works correctly, it is when I call it using subprocess.call() that things go bad.
My environment consists of:
- xfce4-terminal 0.6.3
- Linux 3.13.0-32-lowlatency #57-Ubuntu SMP PREEMPT Tue Jul 15 04:08:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
- Python 2.7.6
- NCURSES_VERSION "5.9"
- GNU Make 3.81
- crosstool-NG version 1.19.0
Is what I am seeing a known problem? Is there something else I should be doing?
UPDATE: Thanks Eric... That got me 0.5f way there... I can navigate the menu now, but it still leaves droppings behind: