Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit af6ce2e

Browse files
committed
Detect sys.frozen in a more robust manner, using patch submitted by
Jouni Seppanen. - ADS svn path=/trunk/matplotlib/; revision=2166
1 parent 1696792 commit af6ce2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def _get_data_path():
349349
if os.path.isdir(path): return path
350350

351351
# py2exe zips pure python, so still need special check
352-
if (sys.platform=='win32' or sys.platform=='darwin') and sys.frozen:
352+
if getattr(sys,'frozen',None):
353353
path = os.path.join(os.path.split(sys.path[0])[0], 'matplotlibdata')
354354
if os.path.isdir(path): return path
355355
else:

0 commit comments

Comments
 (0)