View Single Post
Old 02-26-2019, 03:40 PM   #32
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,311
Karma: 448560
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Looks like the dependency isn't Python 3-compatible:

Code:
KoHighlights-0.5.0.0$ python3 main.py 
Traceback (most recent call last):
  File "main.py", line 17, in <module>
    from slppu import slppu as lua  # https://github.com/noembryo/slppu
  File "/home/frans/src/kobo/KoHighlights-0.5.0.0/slppu.py", line 131
    print ERRORS['unexp_end_string']
               ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(ERRORS['unexp_end_string'])?
But other than that APPDATA thing I suspect it might pretty much just work as is.

Edit: yup, works fine.

Edit 2: except for this when double clicking on a book since os.startfile() is apparently Windows-only:

Code:
$ python main.py 
Traceback (most recent call last):
  File "main.py", line 377, in on_file_table_itemDoubleClicked
    (os.startfile(path) if isfile(path) else
AttributeError: 'module' object has no attribute 'startfile'
You can easily make it a little more generic using something like this (via):
Code:
import os, sys, subprocess

def open_file(filename):
    if sys.platform == "win32":
        os.startfile(filename)
    else:
        opener ="open" if sys.platform == "darwin" else "xdg-open"
        subprocess.call([opener, filename])
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2019-02-26_21-43-25.png
Views:	264
Size:	47.5 KB
ID:	169925  

Last edited by Frenzie; 02-26-2019 at 03:49 PM.
Frenzie is offline   Reply With Quote