Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 01-23-2012, 11:32 PM   #16
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Hi Mackx,

I quick note as I will comment deeper in another message.

In the apps "python" launchers in version 3a you write "import appcalc.py". That's not correct python, it should be "import appcalc", without the extension.
You use the syntax "import module.submodule" to import some submodules from a big package, as in "import books.epub", where you have a module books with different submodules:
Code:
python26/
    lib/
        site-packages/
            books/
                __init.py__
                epub.py
                pdf.py
                ...
Anyway, good work.

Last edited by Iņigo; 01-23-2012 at 11:35 PM.
Iņigo is offline   Reply With Quote
Old 01-24-2012, 12:00 AM   #17
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quick comment #2: can't load liberutils

Code:
root@qemuarm:/media/mmcblk0p1/Programs# ./_python26/bin/python
Python 2.6.4 (r264:75706, Mar 16 2010, 14:39:27) 
[GCC 4.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes as C
>>> erutils = C.cdll.LoadLibrary( 'liberutils.so.0' )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/media/mmcblk0p1/Programs/_python26/lib/python2.6/ctypes/__init__.py", line 431, in LoadLibrary
    return self._dlltype(name)
  File "/media/mmcblk0p1/Programs/_python26/lib/python2.6/ctypes/__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/liberutils.so.0: undefined symbol: g_free
It happens both in qemu and DR800.
Iņigo is offline   Reply With Quote
Advert
Old 01-24-2012, 03:04 PM   #18
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by Iņigo View Post
In the apps "python" launchers in version 3a you write "import appcalc.py". That's not correct python, it should be "import appcalc", without the extension.
Oops, yes, I totally missed that, I am so used to C ... I will fix it in the next version. Maybe I will also use the module.submodule construction for the er-modules.
Mackx is offline   Reply With Quote
Old 01-24-2012, 03:31 PM   #19
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by Iņigo View Post
Quick comment #2: can't load liberutils

It happens both in qemu and DR800.
Oops again ... the dependency for building liberutils is not correct, I fixed that locally but forgot all about it. I will create a new package with an install program for the updated file.
I added:
lib@PACKAGE_NAME@_la_LIBADD = $(DEPS_LIBS)
to the makefile of liberutils, see also bitbucket (I just pushed)

Thanks for reporting both comments (bugs !
Mackx is offline   Reply With Quote
Old 01-24-2012, 04:01 PM   #20
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
I created an installation package for the patched system-file. This is an update,
1) so first copy python26-dr-v2.tar.zip and
2) then the attached file (python26-dr-v4-upgrade.zip).
After re-inserting the SD card you will see 'Install Python Patch' in SD-Card/Programs/Install.
3) Click on the icon (note that this only needs to be done once!). The file will be copied and the DR will reset so the new library will be used (might cause strange artifacts on the screen).

Note that the package is still in alpha state, the screen refreshes on the DR are really bad I need to find some good moments to refresh the screen. So the Calc-program is not really usable yet.

Iņigo: thanks again for the feedback.
Attached Files
File Type: zip python26-dr-v4-upgrade.zip (88.1 KB, 338 views)
Mackx is offline   Reply With Quote
Advert
Old 01-25-2012, 04:40 AM   #21
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Sorry sorry sorry, I keep on messing things up. The install script from the previous zip file does not work correctly. This is an update, see the installation instructions in the previous message use the v5 instead of the v4.

Refreshes are a little better, but not good yet.
Attached Files
File Type: zip python26-dr-v5-upgrade.zip (88.3 KB, 333 views)
Mackx is offline   Reply With Quote
Old 01-26-2012, 08:55 AM   #22
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
I have solved the refresh problem, but had to rewrite a lot of the drawing code. I now use a pixmap that is copied to the DrawingArea using draw_drawable. This should show others how to use python and get proper refreshes of the screen (might also work for vala).
The calc program is now very basic, you can open a file which will be shown and you can scroll the content using the widgets in top of the screen or, on the DR1000, the buttons at the side of the DR. There are a lot of limitations, columns have a fixed width, font is fixed, no formulas, alignment is fixed to the left, etc etc etc.

For installation see message #20. If you already did the actions described there, you only have to copy the new content attached to this message to your SD card.
Attached Files
File Type: zip python26-dr-v6-upgrade.zip (88.8 KB, 317 views)
Mackx is offline   Reply With Quote
Old 03-19-2012, 05:49 AM   #23
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
I updated the calc application a little bit so that it is more usefull:
- Cells can be edited
- Files can be stored
- Simple formulas can be used
- Copying/Pasting cells is possible
Examples of formulas are (enter the text below without the quotes):
'=[-2,0]-[-2,-1]' : use relative position for cell
'=[A1] + 10' : absolute cell
'=100/[-1,0]' : +, -, / and * are supported, as are brackets '()'

Note that I still consider it more like a demonstrator then as an application. There is still a lot that can be improved on the usability of the application.

For installation see message #20. If you already did the actions described there, you only have to copy the new content attached to this message to your SD card.
However, to link the .csv-extension to Calc, you need to (re-)run Programs/Install/Install Python Patch, even if you did this before.
Attached Files
File Type: zip python26-dr-v7-upgrade.zip (105.4 KB, 359 views)
Mackx is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python 2.6 for iLiad ericshliao iRex 14 01-28-2009 01:08 AM
Python 2.5 or 2.6? itimpi Calibre 5 01-19-2009 12:48 PM
Mac and Python hackettt Sony Reader 5 11-17-2008 10:39 AM
python coding... alexxxm Sony Reader 8 01-31-2008 12:25 PM
iLiad pyGTK rudysplif iRex Developer's Corner 2 12-23-2007 06:29 AM


All times are GMT -4. The time now is 12:13 AM.


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