Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-25-2013, 11:13 PM   #16
briant1234
Enthusiast
briant1234 substituted for the Southern Oracle when it was on vacation.briant1234 substituted for the Southern Oracle when it was on vacation.briant1234 substituted for the Southern Oracle when it was on vacation.briant1234 substituted for the Southern Oracle when it was on vacation.briant1234 substituted for the Southern Oracle when it was on vacation.briant1234 substituted for the Southern Oracle when it was on vacation.briant1234 substituted for the Southern Oracle when it was on vacation.briant1234 substituted for the Southern Oracle when it was on vacation.briant1234 substituted for the Southern Oracle when it was on vacation.briant1234 substituted for the Southern Oracle when it was on vacation.briant1234 substituted for the Southern Oracle when it was on vacation.
 
Posts: 39
Karma: 132550
Join Date: Aug 2012
Device: Kindle Touch
thanks twobob
briant1234 is offline   Reply With Quote
Old 02-08-2016, 06:14 PM   #17
jue
Junior Member
jue is on a distinguished road
 
Posts: 8
Karma: 62
Join Date: Feb 2016
Location: Germany
Device: kindle PW2 9017
Thanks for this great package, dos1!

Just to confirm that this package still works on my PW2 (fw 5.6.5), when the package 'libpng12-0' is added to the build script posted here: https://www.mobileread.com/forums/sho...52&postcount=6

Or alternatively, extract the contents of the attached file in the folder python/lib/arm-linux-gnueabi/
Attached Files
File Type: gz libpng12.so.0.tar.gz (63.9 KB, 240 views)

Last edited by jue; 02-08-2016 at 06:49 PM. Reason: added firmware version
jue is offline   Reply With Quote
Old 04-22-2021, 01:01 AM   #18
Amias
Member
Amias began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Apr 2021
Device: KPW4
Quote:
Originally Posted by dos1 View Post
Hi,

I couldn't find already packaged PyGTK for Kindle, so I decided to do it on my own. And I've just got PyGTK running on my Paperwhite.

I've used latest Debian sid armel packages. There is GTK+ provided (and few others) despite of Kindle having its own version - I was too lazy to recompile everything to fix missing symbols issues.

All symlinks and hard links in package are dereferenced, which means that it can be safely unpacked on /mnt/us, but it also means that there are copies instead of links and they take more space.

Download: http://dosowisko.net/kindle/python.tar.gz

Usage:

Unpack python.tar.gz package in /mnt/us/extensions (or if you're in USB disk mode - in /extensions). If you really want to, you can place it somewhere else, but you'll need to tweak paths in pythonenv file.

You can setup environment with ". pythonenv" command. After that you can just call "python", or run python files just like any other executable. There are test files bundled - type "python demos/gtk-test.py" to run one.

(please note that windows have to have proper X11 class names in order to be correctly displayed by Awesome - refer to https://www.mobileread.com/forums/sh...hp?t=162022#10 for more info)

It probably won't work on any other Kindle than Paperwhite, but you can still try (update: thanks to twobob we now know that it works on Touch too )

Cheers
the download links failed
Amias is offline   Reply With Quote
Old 04-22-2021, 05:01 AM   #19
encol
Addict
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 397
Karma: 750286
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
Try to copy the link in a new window, for me it works
encol is offline   Reply With Quote
Old 04-22-2021, 05:34 AM   #20
Amias
Member
Amias began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Apr 2021
Device: KPW4
Quote:
Originally Posted by encol View Post
Try to copy the link in a new window, for me it works
Thanks, i have already settled this.
But it does not work after i execute ./pythondev
and command 'python' does not exist
Amias is offline   Reply With Quote
Old 04-22-2021, 10:41 AM   #21
Amias
Member
Amias began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Apr 2021
Device: KPW4
any update to python3.9.4 and pygtk3.0?
Amias is offline   Reply With Quote
Old 04-22-2021, 12:36 PM   #22
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 11,648
Karma: 20483323
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O & Forma
Have you looked at the thread's age? That should give you your answer.
NiLuJe is offline   Reply With Quote
Old 04-22-2021, 06:27 PM   #23
Amias
Member
Amias began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Apr 2021
Device: KPW4
Quote:
Originally Posted by NiLuJe View Post
Have you looked at the thread's age? That should give you your answer.
yes, and i tried to configure https://dosowisko.net/kindle/build-python.py,
but it fails to work
Amias is offline   Reply With Quote
Old 04-22-2021, 09:59 PM   #24
Amias
Member
Amias began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Apr 2021
Device: KPW4
why?Code below doesnot work, however gtk-test.py works normally
Spoiler:
#!/usr/bin/env python

import pygtk
import gtk
pygtk.require('2.0')

class PyApp(gtk.Window):

def __init__(self):
super(PyApp, self).__init__()
self.set_title("Check Button")
self.set_default_size(250, 200)

vbox = gtk.VBox()
self.btn1 = gtk.CheckButton("Button 1")
self.btn1.connect("toggled", self.on_checked)
self.btn2 = gtk.CheckButton("Button 2")
self.btn2.connect("toggled", self.on_checked)
self.lbl = gtk.Label()
quitBtn = gtk.Button("quit the test.")
quitBtn.connect("clicked", lambda w: gtk.main_quit())

vbox.add(quitBtn)
vbox.add(self.btn1)
vbox.add(self.btn2)
vbox.add(self.lbl)

self.add(vbox)
self.connect("destroy", gtk.main_quit)
self.show_all()

def on_checked(self, widget, data = None):
state = "Button1 : "+str(self.btn1.get_active())+"Button2 : "+str(self.btn2.get_active())
self.lbl.set_text(state)

if __name__ =="__main__":
PyApp()
gtk.main()
Amias is offline   Reply With Quote
Old 04-23-2021, 12:29 AM   #25
Amias
Member
Amias began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Apr 2021
Device: KPW4
Plus, this does not display the menu when clicked
should i bring it to top? But there is no methods.
Spoiler:

mb = gtk.MenuBar()

menu1 = gtk.Menu()
msg = gtk.MenuItem("MessageDialog")
menu1.append(msg)

def on_msgdlg(widget):
#MessageDialog usage code
print 'i was clicked'
return 0

msg.connect("activate", on_msgdlg)
vbox = gtk.VBox(False, 2)
vbox.pack_start(mb, False, False, 0)
self.mainWindow.add(vbox)

self.mainWindow.show_all()
Amias is offline   Reply With Quote
Reply

Tags
gtk, k5 tools, kindle, paperwhite, pw tools, pygtk, python

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Paperwhite Marc_liest Amazon Kindle 360 01-17-2014 05:24 AM
Python for kindle Matan Kindle Developer's Corner 8 01-04-2013 01:54 PM
Amazon launches Kindle Paperwhite and Kindle Lending Library in Europe HarryT News 18 10-13-2012 10:24 AM
Python + pyGTK package for the DR v3.0 Mr. X iRex 22 03-19-2012 05:49 AM
iLiad pyGTK rudysplif iRex Developer's Corner 2 12-23-2007 06:29 AM


All times are GMT -4. The time now is 03:18 PM.


MobileRead.com is a privately owned, operated and funded community.