View Single Post
Old 09-02-2017, 04:37 PM   #228
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,738
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
@DiapDealer: Thanks for the code! After some cosmetic changes, it seems to work on all three platforms:

Code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, os

def run(bk):
    print(sys.path)
    for path in sys.path:
        if "plugin_launchers/python" or "plugin_launchers\\python" in path:
            print(path)
            sys.path.append(os.path.normpath(os.path.join(path, '../../python3lib')))
            print(sys.path)
            break
        
    try:
        import ncxgenerator
        print('python3lib path', os.path.dirname(os.path.abspath(ncxgenerator.__file__)))
    except ImportError:
        print('Can\'t find python3lib')
        
    return 0

def main():
    print('I reached main when I should not have\n')
    return -1

if __name__ == "__main__":
    sys.exit(main())
Doitsu is offline   Reply With Quote