I have recently installed ROOT version 6.06 on mac using macports. I am running python version 2.7.11 which I also installed using macports. ROOT works just fine from the ROOT prompt, however, when I try to use PyROOT I run into some strange behaviour from the terminal.
Essentially once I’ve imported ROOT into python (which doesn’t give any error) the backspace key and arrow keys no longer work as expected. Pressing the backspace key seems to delete characters as expected but this is not reflected at the terminal until after the enter key is pressed.
For example if I type “1+1” and then press the backspace key the text displayed at the terminal does not change and the cursor does not appear to move, however, if I then press enter then I get the following error as you might expect:
File "<stdin>", line 1
SyntaxError: invalid syntax
If I again type “1+1” but this time press the left arrow key nothing seems to happen on screen (the cursor does not move) but if I then hit backspace the display changes to “1+11” and pressing enter simply leads to an output of “11”. Similarly pressing the up arrow multiple times after a set of commands appears to add each one to current line without deleting the previous one but hitting enter only executes the most recent one.
What seems to be happening is that the terminal still understands the input from the keyboard as expected but something is going wrong with the way it displays these changes on the screen.
These aren’t problems I’ve encountered before on this machine (or any other) and they don’t occur when importing any other module (e.g. numpy, matplotlib etc.) into python. So far I’ve tried reinstalling ROOT6, updating python, switching to ROOT5 and using a different terminal (iTerm rather than the default osx terminal) but I still run into the exact same problem.
Sorry if I haven’t explained the problem clearly enough but if anyone has any ideas as to what might cause this sort of behaviour or how to troubleshoot it I’d be very glad to hear them.