View Single Post
Old 02-26-2019, 10:00 PM   #33
embryo
Evangelist
embryo will blow your mind, man!embryo will blow your mind, man!embryo will blow your mind, man!embryo will blow your mind, man!embryo will blow your mind, man!embryo will blow your mind, man!embryo will blow your mind, man!embryo will blow your mind, man!embryo will blow your mind, man!embryo will blow your mind, man!embryo will blow your mind, man!
 
embryo's Avatar
 
Posts: 464
Karma: 57018
Join Date: Aug 2013
Device: Kobo Glo
@Frenzie Thank you for testing..

I've made the slppu.py python 3.x compatible and also added the function to open the books on other OSes.

What do you mean by "the APPDATA thing"?
EDIT: Ah, you meant the os.environ["APPDATA"] that is used for the SETTINGS_DIR variable...
How about using this:
Code:
if sys.platform == "win32":  # Windows
    SETTINGS_DIR = join(os.environ["APPDATA"], APP_NAME)
elif sys.platform == "darwin":  # MacOS
    SETTINGS_DIR = join(os.path.expanduser("~"), "Library",
                        "Application Support", APP_NAME)
else:  # Linux
    SETTINGS_DIR = join(os.path.expanduser("~"), "." + APP_NAME)
I will upload the changes to github but not compile the 0.6. version yet, since I'm waiting for other KoReader changes (hint-hint ;o)

Last edited by embryo; 02-27-2019 at 07:08 AM.
embryo is offline   Reply With Quote