Thread: 903 Python on pocketbook
View Single Post
Old 12-15-2011, 12:45 PM   #1
jbaach
Connoisseur
jbaach can self-interpret dreams as they happen.jbaach can self-interpret dreams as they happen.jbaach can self-interpret dreams as they happen.jbaach can self-interpret dreams as they happen.jbaach can self-interpret dreams as they happen.jbaach can self-interpret dreams as they happen.jbaach can self-interpret dreams as they happen.jbaach can self-interpret dreams as they happen.jbaach can self-interpret dreams as they happen.jbaach can self-interpret dreams as they happen.jbaach can self-interpret dreams as they happen.
 
Posts: 80
Karma: 20837
Join Date: Aug 2011
Device: prs 505, pocketbook 903, onyx boox m92
Python on pocketbook

Using Lonetechs qemu image (thanks soo much for that) I played a bit around - compiling python. Strangely enough copying the results to the pocketbook showed first signs of success (using the greatly useful rsh from review, thx):

Code:
joerg@mint:~$ nc -l 9999
/bin/sh: can't access tty; job control turned off
~
~
BusyBox v1.16.1 (2010-10-11 18:29:44 EEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
~
$ cd /mnt/ext1/applications/python  
$ ls
bin
include
lib
share
$ echo "print 'hello world!'" > test.py
$ cat test.py
print 'hello world!'
$ ./bin/python test.py
hello world!
$ echo 'print 1+1' > test2.py
$ ./bin/python test2.py
2
$
The python.tgz needs to be unpacked, and the contained python folder should be moved to /mnt/ext1/applications.

I used "./configure --prefix=/mnt/ext1/applications/python --disable-shared" to compile it. Later on I will try to compile a new version with readline, sqlite etc. I hope that this thing really works :-).

Edit: a very quick test shows that a webserver on the pocketbook works as well:

testserver.py:

Code:
import SimpleHTTPServer
import SocketServer
PORT = 8000
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("", PORT), Handler)
print "serving at port", PORT
httpd.serve_forever()
Oh, I am getting quite exited, given that the qemu image (did I mention that I am really grateful for that?) allows us to compile lots of nice libraries (e.g. poppler) :-))

Btw, I am using 2.1.2 rc6

Last edited by jbaach; 12-15-2011 at 01:03 PM. Reason: added firmware version; testserver
jbaach is offline   Reply With Quote