08-26-2016, 12:52 PM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: Aug 2016
Device: Kindle 7th generation
|
Python + PyQt enviroment for Kindle & PaperWhite devices.
Hello every one, I'm new here and this is my first post I hope that you enjoy.
A month ago I got my Kindle touch 7 generation (AKA KT2), since I saw that the device have a python environment I start to seek an PyQt environment to program or port some PyQt aplications whithout results. For the people who don't know QT if an amazing framework for GUIs an have other tools for networking databases an others and PyQt is a wrapper tho allow use QT in Python. Then I decided to do it my self, but the task was hard because I did not haven experiences developping for thes devices, after days of study and asking for some people I make the environment work. Using the PyGTK environment in https://www.mobileread.com/forums/sho...0&postcount=38 I add the Qt librarys an the PyQt librarys from the Debian armel repository, modify the scripts to set up the environment. In the PyQt applications is important to put the magic string in the windows title to see the application. To install the environment you must have install KUAL launcher, then extract the zip on the extension folder then you will see the menu "PyQt APPs" in KUAL for now this will run a example application in PyQt, if you have installed the kterm in your Kindle thet you can prove the text editor example application ported to Kindle stored in /mnt/us/extension/python/runitPyQt.sh I did't tied on other devices. If work in others devices please notify us Autor: Francisco Perdigon Romero (aka bosito7) Special Thanks for David Boddie (aka dboddie), knc1, blkhawk. The links for download the environment: Google Drive: https://drive.google.com/folderview?...zQ&usp=sharing Dropbox: https://www.dropbox.com/sh/onpn4v2en...xPV5BJpua?dl=0 GitHub (the last updates will be here): https://github.com/bosito7/kindle_Python_PyQt_env Here some images: |
09-15-2016, 11:23 AM | #2 |
Addict
Posts: 229
Karma: 136002
Join Date: Apr 2013
Device: PW
|
thanks for the work and contribution
|
Advert | |
|
11-17-2016, 05:15 AM | #3 |
Connoisseur
Posts: 85
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KV,KOA2,PW5
|
QT is most Modern and flexible GUI frame,
user interface is very important, especially on kindle , lot of third part app of kindle has difficult UI , e.g leafpad of kindle, hard to select specific txt , hard to page down page up, click several times to open correct menu... maybe there is way to create better(at least User-friendly interface) app of kindle with pyqt, great job bosito7! thanks alot ! PS > why is pyqt, why not pyside, they are almost same funcation, but pyside is LGPL license, free to use, pyqt not Last edited by kdusr; 11-17-2016 at 05:28 AM. |
11-17-2016, 07:01 AM | #4 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Some people, even some entire nations, do not believe in Intellectual Property Rights (except their own).
So asking them to follow the terms of software licenses is a waste of time and bandwidth. Also, GTK+ is already installed in the factory images. |
11-18-2016, 02:29 PM | #5 | ||
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
That being said, I don't see why using a different language would inherently make it "better" than Leafpad. You will need to code it to be "better", either way. Quote:
Last I checked, PyQt is GPL, which is the same as LGPL except for the permission to link shared libraries to proprietary code. |
||
Advert | |
|
11-25-2016, 10:15 PM | #6 |
Junior Member
Posts: 2
Karma: 10
Join Date: Oct 2013
Device: kindle pw
|
Hello, I found your python+PyQt compiled by glibc 2.15, but my kindle only has glibc 2.10 so it's not working.
Can you provide your source code and compiling environment so I can recompile it with an older version of gcc. Thanks! |
11-25-2016, 10:36 PM | #7 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
borrow a copy of glibc-2.15 (or newer) from Debian/Jessie/ARMel - add it to the */esys/lib directory. then patchelf the application's library path to look for it there rather in the usual, reserved system directories. Linux uses ELF format binaries, ELF systems support the (concurrent) use of multiple system libraries. See my ARMhf on Kindle thread for a worked example in detail. (In that case, it was a different version and it was hard float rather than soft float - but the principles are the same). |
|
11-26-2016, 01:28 AM | #8 | |
Junior Member
Posts: 2
Karma: 10
Join Date: Oct 2013
Device: kindle pw
|
Quote:
``` ImportError: /lib/libc.so.6: version `GLIBC_2.15` not found (required by /mnt/us/extensions/python/usr/lib/arm-linux-gnueabi/libaudio.so.2) ``` I firstly tried to set LD_LIBRARY_PATH and place 'libc.so.6' extracted from debian/jessie/armeabi under LD_LIBRARY_PATH. But the program still loads 'libc.so.6' from '/lib/libc.so.'6. Then I used PatchELF to add RUNPATH '.' to 'python2.7', which is the executable, and put libc.so.6 the same directory as 'python2.7'. But it still loads from '/lib/libc.so.6'. finally I inspected 'libaudio.so.2' with 'readelf -d', but there is no RUNPATH. The command 'ldd python2.7' and 'ldd libaudio.so.2' also gives linkage to '/lib/libc.so.6'. I really can't figure it out, can you help me please. |
|
11-26-2016, 03:43 AM | #9 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
$ LD_DEBUG=libs <executable name> <args>
And you probably want a runpath relative to $ORIGIN For a tree like: MyApp | +-- bin | +-- lib set runpath '$ORIGIN/../lib' (the loader will follow that by searching /lib, /usr/lib) That thing that looks like a shell variable above IS NOT, it is a special flag (including the '$'). No, do not hack LD_LIBRARY_PATH, change the executable (and libraries as required). Last edited by knc1; 11-26-2016 at 03:51 AM. |
Tags |
developement, developers corner, kindle applications, pyqt, python |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Python + PyGTK for Kindle Touch and Paperwhite | dos1 | Kindle Developer's Corner | 25 | 07-14-2021 09:52 AM |
Help with Duokan && Jailbreak on Kindle Paperwhite 5.6.1.0.6 | elenderg | Amazon Kindle | 3 | 06-10-2015 05:37 PM |
Calibre & the New Kindle Paperwhite | ehani | Library Management | 17 | 02-13-2014 03:51 PM |
Calibre & the New Kindle Paperwhite | ehani | Library Management | 1 | 02-06-2014 04:11 PM |