From bbacfc2f9b102cda02c33d2237d63437108c289b Mon Sep 17 00:00:00 2001 From: Moreno Cunha Date: Thu, 5 Jan 2017 22:45:31 -0200 Subject: [PATCH] Add UNIX os path support --- api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api.py b/api.py index 9adc2d0..ae5fe72 100644 --- a/api.py +++ b/api.py @@ -20,7 +20,10 @@ def module_path(): encoding = sys.getfilesystemencoding() if we_are_frozen(): return os.path.dirname(unicode(sys.executable, encoding)) - return os.path.dirname(unicode(__file__, encoding)) + elif os.name == 'posix': + return os.path.dirname(os.path.abspath(__file__)) + else: + return os.path.dirname(unicode(__file__, encoding)) class BetaFaceAPI(object):