本文介绍了qpython没有“gnu-readline”能力的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Samsung Galaxy Appeal(android 2.3.6)上安装了qpython,但是解释器的命令行没有readline编辑功能,这使得它不实用。这不是通常包括自动吗?这与当前活动的Shell有关吗?我从来没有理解如何添加readline到Python(这不只是导入一个模块)。

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).

推荐答案

m假设你的意思是QPython不能理解input或raw_input语句。我不是一个有经验的程序员,所以如果我错了,请纠正我。
但是我的手机上的问题是通过在我的脚本开头添加这些代码行:

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

这篇关于qpython没有“gnu-readline”能力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 15:54