qpython has no 'gnu-readline' capability

2019-07-21 13:23发布

问题:

I've installed qpython on my Samsung Galaxy Appeal (android 2.3.6), but the interpreter's commandline has no 'readline' editing capability, which makes it impractical to use. Isn't this usually included automatically? Does this have something to do with the currently active Shell? I've never understood how to add readline to Python (it's not just a matter of importing a module).

回答1:

I'm assuming that you mean QPython cannot understand input or raw_input statements. I'm not an experienced programmer, so please correct me if I'm wrong. But the problem was solved on my mobile by adding these lines of code at the beginning of my script:

#-*-coding:utf8;-*-
#qpy:console
#qpy:2