Questions tagged [qpython]
Python scripting facility for Android
220
questions
-2
votes
1
answer
31
views
Can QPYTHON be used to write long complex programs [closed]
Can QPYTHON handle running long complex programs? I am new to python and would like to know.
0
votes
1
answer
24
views
Trying to install Calendar.py
How can I get the library for calendar.py? I'm new to this.
I tried installing it and got the following error...
pip3 install calendar.py
Collecting calendar.py
Could not find a version that ...
-1
votes
0
answers
10
views
Qpython and Google drive
Why doesn't qpython have an option where you can retrieve your files from Google drive? How can I retrieve files that are in Google drive using qpython?
I tried using qpython to retrieve files from ...
0
votes
0
answers
12
views
Is it necessary to install all libraries in qpypi
Good evening, I am new to qpython 3 and would like to know if it's necessary to install all packages that are in QPYPI library?
The only library I installed was numpy.
0
votes
0
answers
20
views
Running python server on phone to gain access to my pc
I have these 2 script for a backdoor, one of them is for the client the other one for a server, both in python. When I try to run the server script to give commands to my pc that is running the client ...
0
votes
0
answers
44
views
Check whether an app or thread is already running when restarting qpython script
For me the the behaviour of Android regarding the lifetime of an application is something mysterious. Specifically:
I start qPython and run a script. This script launches a thread that runs in the ...
0
votes
0
answers
59
views
Python - qpython scrip to get a CPU ID or Hardware ID
I am beginner in Python coding, I try to create a little python script to get/read a CPU ID or Hardware ID, Android ID or if there are others Unique ID to get/read easy from android devices even ...
-1
votes
1
answer
147
views
Join columns to a table in parallel
Currently I use a function to run an aj join for a single column from a large table on to a smaller table which has its time column shifted t milliseconds ahead, joining on a sym column as well as ...
-1
votes
2
answers
154
views
Force killing of q session after query is done
I am trying to force killing (not closing) a q session once my query is done to save resources on my machine.
It is currently working using:
conn.sendAsync("exit 0")
Problem is, if I run a ...
-2
votes
1
answer
106
views
Use the bin binary on a per-ticker basis
For two tables each with datetime and ticker symbol columns, how can we achieve the functionality of the binary function bin within each ticker group. That is, instead of returning the latest index ...
0
votes
2
answers
28
views
I'm trying to print unicode characters from QPython
Trying to print unicode characters like ┌┌┝├ from QPython 3.6 (under Android on a Chromebook with Chrome OS 100) but print(u"┌┌┝├") prints nothing, and using \u doesn't work since \ is the ...
0
votes
2
answers
200
views
kdb calculate percent change between rows
i calculate percent change in 24 hour by this way that you can see below.
is there any way to get calculated percent directly from kdb by query?
df should return the percent as final value.
df = q....
1
vote
1
answer
142
views
kdb select only one row for each minute
i have some records on kdb, as you see we have 10 row for time: "8:33" and 19 row for time "8:34" and some other row for time "8:35".
now, how can i select only one row ...
1
vote
1
answer
191
views
kdb get last 1 hour records
i need to select and get rows which are related to previous 1 and 24 hours. to handle 24 hour i used this code. what about 1 hour how can i get that?
yesterday = datetime.now() - timedelta(1)
...
0
votes
0
answers
57
views
QPython cant send multiple SMS at once
I have text that is bigger than SMS limits so I splitted it, but qpython with androidhelper's Android.smsSend("address","text") send's only last sms
import androidhelper
import ...
1
vote
2
answers
777
views
How to fetch the table or view metadata from KDB and save to a data-structure?
I have been trying to fetch the metadata from a KDB+ Database using python, basically, I installed a library called qpython and using this library we connect and query the KDB+ Database.
I want to ...
1
vote
1
answer
166
views
Can't retrieve symbols from KDB using QPython
I am trying to pull a KDB table into a python dataframe. The table is created successfully, all float columns are visable but symbol columns are blank.
I am using:
with qconnection.QConnection(host = '...
1
vote
0
answers
123
views
How to turn on the phone flashlight with Qpython?
I coded a Python program to make time laps with the Androidhelper library, only I have one last problem: turn on the light of the phone when it is dark
I have searched the documentation of ...
1
vote
0
answers
108
views
Pip install is too slow
Hello I am trying to install a few modules in Qpython but is really slow, I also tried using the alternative with Qpypi and its just really slow, my download rate is between 5KBs and 10KBs...
I am ...
1
vote
0
answers
47
views
qpython -(contact list command)
I wrote this command in editor qpython3 in my Android Handy.(Mi A3)
Why I get (name not define) this error?
MY CODE:
a = contactsGetIds()
print(a)
Error:
/data/user/0/org.qpython.qpy3/files/bin/...
0
votes
1
answer
261
views
Get battery temperature using androidhelper
I am wondering how to get battery temperature using
batteryGetTemperature()
Why do get error
And how to solve it
droid.batteryStartMonitoring()
print("Battery Percentage: " + str(...
0
votes
1
answer
33
views
Qpython OL: type org.json.JSONArray cannot be converted to JSONObject in makeIntent()
I am trying to make an intent using androidhelper in Qpython OL with the code below:
action = "org.escpos.intent.action.PRINT"
packagename = "com.loopedlabs.escposprintservice" # ...
1
vote
1
answer
434
views
Timeout in what units
Is the timeout in qpython.qconnection.QConnection in any specific units, or it is just non-dimentional number?
From my experience, number 3000.0 corresponds roughly to 20 seconds.
Ref:
Timeout in ...
0
votes
1
answer
1k
views
Query in q-lang using qPython and Pandas in Python 3.8
I am totally new to q-language, but I need to use it in order to access a kdb server to get the data from.
I am using Python 3.8, under Windows10, with qPython installed.
I have trouble getting the ...
1
vote
0
answers
122
views
warning and error messages upon clicking QPYPI CLIENT
I am new to coding with qpython. I am facing warning and error messages upon clicking QPYPI CLIENT. What could be the issue
ntry: type 0x6ffffffe arg 0x12458
WARNING: linker: libpython2.7.so.1.0: ...
0
votes
1
answer
672
views
How can I commit a dataframe to kdb as a new table?
I'm aware of this question was already answered here, however as a new q-bie I am still quite confused with how to create and insert a new table using q.
My problem: I have a dataframe and I am using ...
0
votes
0
answers
21
views
How can we intergrate kanji to be an available in the qpython 3 in the console side as it is in the interpreter side?
I'm trying to figure out how I can type in kanji from the console side of qpython3. Maybe it's the phone i'm using. They say that the program acts differently depending on the phone/version/etc. Is ...
0
votes
1
answer
318
views
Installing pandas for QPython app on android
I am using the QPython app on my android device to run scripts. I have a script that requires the pandas package but can't seem to download it onto my phone. The app has a section for downloading ...
-2
votes
2
answers
131
views
How do I select the specific data in a data frame based on thee contents of other columns?
I'm new to pandas and I'm currently trying to use it on a data set I have on my tablet using qPython (temporary situation, laptop's being fixed). I have a csv file with a set of data organised by ...
1
vote
1
answer
501
views
How to insert a row into KDB using qPython
I'm trying to use a script to connect to a KDB and insert rows into a table in the KDB using qpython (https://github.com/exxeleron/qPython). My table has the following column types:
"symbol","symbol","...
1
vote
1
answer
712
views
Return KDB query to a pandas dataframe
I would like to extract data from a KDB database and place into a dataframe. My query runs fine in qpad, no issues; just need to write it into my Pandas dataframe. My code:
from qpython import ...
0
votes
1
answer
194
views
Trying to convert kdb to csv using python, everything converts correctly except one column
I have converted a kdb query into a dataframe and then uploaded that dataframe to a csv file. This caused an encoding error which I easily fixed by decoding to utf-8. However, there is one column ...
2
votes
2
answers
916
views
Saving a kdb table to a dataframe then saving the dataframe to a csv. null and string values outputting to csv incorrectly?
I am saving a kdb table to a dataframe then saving the dataframe to a csv. This works, however, the csv file and if i print(dataframe); null values are showing as " b" ", and all other string values ...
0
votes
1
answer
524
views
Call/Send SMS with SIM card 1 and 2 with qpython3
I have managed to make a call and send an SMS with sl4a for python but it is using the default selected SIM in android system settings.
Is there a way to force SIM 1 or 2 from inside the python code?
...
0
votes
1
answer
5k
views
QPython requests SSL error- no available ciphers
Ive been trying to use requests.get for sometime now but I keep getting this error on Qpython
HTTPSConnectionPool(host='google.com', port=443):
Max retries exceeded with url:
/ (Caused by SSLError(
...
1
vote
1
answer
487
views
How to start sl4a server on android from terminal and connect to it with python?
I'm installed qpython app to my phone. From the app I can run scripts with androidhelper but if I run qpython from terminal and try to create an Android object it has been refused.
$ pwd
/data/user/0/...
0
votes
2
answers
2k
views
Qpython3.6 - Using androidhelper module, getting unexpected results
Here is my current code:
>>>import androidhelper as andr
>>>d = andr.Android()
>>>dir(d) #returns all possible methods for the module
>>>d.batteryGetLevel() #...
0
votes
2
answers
515
views
How does one transfer python code written in a windows laptop to a samsung android phone?
I created numerous python scripts on my pc laptop, and I want to run those scripts on my android phone. How can I do that? How can I move python scripts from my windows pc laptop, and use those python ...
0
votes
2
answers
824
views
How can I access phone number in android with q python?
I try to access all phone number that calling me in Q python.
I wrote this code:
import androidhelper
w=1
while (w == 1):
droid = androidhelper.Android()
droid.startTrackingPhoneState()
...
2
votes
1
answer
209
views
Can I use the android module in python on windows
Is there any way at all to use the android module on windows? I have been trying to make a speech recognition program on windows (which has been a tough thing since it has to work offline) and I ...
1
vote
0
answers
108
views
How to create modules for android qpython
As a newbie to qpython (and python) I am trying to develop a library of useful functions for myself. I gather that I should be able to save a file of those functions somewhere (with a .py extention) ...
1
vote
1
answer
1k
views
PermissionError when closing xlsxwriter Workbook in QPython despite having permissions
I do have permission to write to a specific directory, and the file gets created too. But the line w.close() causes the error.
Since I'm using this module to create the file, it isn't open in any ...
0
votes
1
answer
224
views
Cannot connect to Mariadb from Qpython terminal using Mysql Connector
Please could someone help this newbie. I've installed the following on my Android phone:
QPython v2.4.2
Mysql Connector v1.0.8 (via QPYPI)
MariaDBServer v10.3.8
I can connect to the server using a ...
0
votes
1
answer
758
views
Python code work with qpython but apk crash on mobile
Hy, I tried this code found in many links with some minor differences between them
main.py
#-*-coding:utf8;-*-
#qpy:2
#!/usr/bin/python
# -*- coding: utf-8 -*-
import androidhelper
droid = ...
1
vote
1
answer
527
views
KDB+ query in QPython: Filter based on DataFrame list
I am using qpython to query into a KDB+ database and then performing operations on the output. old_df is output from an earlier qpython sync query which has '[source_id]' as a string column. Now am ...
1
vote
1
answer
286
views
qPython QProjection Issues instead of queried data
I tried writing a Q Code which will allow me to pass parameters however I am getting a results as Qprojection. I tried using
qpython.sync() is returning a QProjection instead of the queried data
...
1
vote
1
answer
2k
views
QPython Pandas Interaction
I have a question pertaining to Pandas Data Frame which I want to enrich with Timings from Tick Source(kdb Table).
Pandas DataFrame
Date sym Level
2018-07-01 USDJPY 110
2018-08-01 ...
0
votes
1
answer
1k
views
Qpython3 and androidhelper, droid.dialogSetSingleChoiceItems
I am trying to figure out androidhelper, which I find very useful to work with python 3 and Android. I am trying to return a selection from a list using dialogSetChoiceItems. I have it set up, and I ...
1
vote
1
answer
817
views
Schedule a QPython script to run daily (on android device)
I would like to know what is the best way I could schedule a script to run daily on my android device, using the QPython app.
What are your suggestions?
Thank you in advance.
2
votes
2
answers
423
views
Qpython - Kivy apps fail "No module named kivy"
I'm using Qpython v2.2.4-8 with python 2.7.12, and am trying to get a kivy app to run. I installed the pip libraries lxml-u4-qpython and kivy-u4-qpython via the app's terminal, and created a new ...