qpython

qpython.sync() is returning a QProjection instead of the queried data

倖福魔咒の 提交于 2019-12-25 08:49:45
问题 So I am running the following query without problems: print(self.data_source.connections['history'].sync( '{[x;y;z]select from trade where date within(x;y), sym in z}', numpy.datetime64('2014-04-14', 'D'), numpy.datetime64('2017-08-14', 'D'), NumpyUtil.parse_symbols(['instr81', 'instr61', 'instr26']) )) Here the self.data_source.connections[] is just a dictionary with the tickerplant, hdb and rdb connections and the NumpyUtil.parse_symbols() is a little method that parses the argument to the

Offline Speech Recognition in qpython3

*爱你&永不变心* 提交于 2019-12-24 16:14:36
问题 I have been trying to make a qpython program that uses sl4a.Android.recognizeSpeech function. The functionality works fine online. In my phone settings, I turned on and downloaded offline speech recognition and google now works fine offline, but the python speech does not work at all, asking me to try again every single time. Sample Code: import sl4a import time droid = sl4a.Android() def speak(text): droid.ttsSpeak(text) while droid.ttsIsSpeaking()[1] == True: time.sleep(1) def listen():

How to execute Python script from Java code in Android

℡╲_俬逩灬. 提交于 2019-12-23 10:53:27
问题 I'm trying to make an standard Android application execute a python script that could return values to Java, but I'm facing a lot of issues. Jython doesnt support this in the Android environment, SL4A is a dead project, Kivi seems to be an full stack framework that do not use Java at all and QPython is SL4A that works on Android 5+ but almost don't have documentation. I wanted something like: // From INSIDE my Java Code new PythonEngine().execute('a = 1 + 1').getInt('a') With QPython I found

How to run QPython over adb shell

房东的猫 提交于 2019-12-23 03:12:39
问题 I installed the QPython on my (rooted) phone. I'm having trouble, however, running the python binary over the adb shell (busybox). I can run the python binary after setting: export LD_LIBRARY_PATH=/vendor/lib:/system/lib:/data/data/com.hipipal.qpyplus/files However, I cannot import any module from the standard library even setting $PYTHONPATH export PYTHONPATH=/data/data/com.hipipal.qpyplus/files/lib/python2.7/site-packages I found a piece of advice how to run QPython in different terminal on

How to install library with pip-console?

北战南征 提交于 2019-12-22 11:05:25
问题 I downloaded some python library package (for example uncompile2) from GitHub. How I can install it into Qpython from the directory in my android device with pip-console? Or at least to try install... 回答1: You could install it directly through pip console, just type "pip install " Or, you can make a .sh file with contents python /your/path/to/the/package/setup.py install Or at least I think so. 回答2: You could copy the modules you want installed into the site-packages folder using a file

Installing numpy in qpython

不羁的心 提交于 2019-12-19 08:31:20
问题 I've been trying to install additional libraries on qpython. Unfortunately the documentation I've found so far is very sparse (e. g. http://wiki.qpython.org/doc/install-libraries/). It says you can install libraries on pip console but it doesn't explain anywhere what that means, neither how to access pip console etc. The second option is to add the library into the following folder: /sdcard/com.hipipal.qpyplus/lib/python3.2/site-packages (For QPython3) This second option seems straight

Installing numpy in qpython

核能气质少年 提交于 2019-12-19 08:31:15
问题 I've been trying to install additional libraries on qpython. Unfortunately the documentation I've found so far is very sparse (e. g. http://wiki.qpython.org/doc/install-libraries/). It says you can install libraries on pip console but it doesn't explain anywhere what that means, neither how to access pip console etc. The second option is to add the library into the following folder: /sdcard/com.hipipal.qpyplus/lib/python3.2/site-packages (For QPython3) This second option seems straight

Kivy QPython app on Android Moto G phone - no log output

邮差的信 提交于 2019-12-11 13:58:14
问题 I'm having some trouble with my Kivy apps when run from the QPython launcher. If I run the standard pong example, I don't see any output. This used to work. So, I suspect that QPython, or Kivy has taken an 'upgrade' which has broken something. In the past I would be able to swipe down to see the log output icon. But, now that's no longer there. Well done QPython, Kivy !!!! So, what's changed? And, how am I supposed to check program log output to see why it no longer runs? Regards Nick 回答1: As

qpython has no 'gnu-readline' capability

对着背影说爱祢 提交于 2019-12-11 00:13:39
问题 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

QPython development environment using mac or windows

流过昼夜 提交于 2019-12-10 11:06:38
问题 Being new to QPython, didn't find any reference about developing on a Mac or Pc, eventually deploying the code on the Android device. In contrast to developing the code itself on the Android device which seems very awkward specially for larger projects. I wish to write the code using a "normal" IDE such as IntelliJ using my Mac or Windows, eventually deploy it on an Android device, and execute with QPython. So the following questions come to mind: Best practice to transfer source code to an