Changeset 3852


Ignore:
Timestamp:
Mar 14, 2019 8:33:19 AM (3 years ago)
Author:
vondreele
Message:

implement fix (modified) to open in G2ctrGUI as per Bo Hau Chen (Taiwan)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r3840 r3852  
    46074607    import ast
    46084608    fname = os.path.splitext(config_example.__file__)[0]+'.py' # convert .pyc to .py
    4609     with open(fname, 'r') as f:
    4610         fstr = f.read()
     4609    if '3' in platform.python_version_tuple()[0]:
     4610        with open(fname, 'r',encoding='utf-8') as f:
     4611            fstr = f.read()
     4612    else:
     4613        with open(fname, 'r') as f:
     4614            fstr = f.read()
    46114615    fstr = fstr.replace('\r\n', '\n').replace('\r', '\n')
    46124616    if not fstr.endswith('\n'):
Note: See TracChangeset for help on using the changeset viewer.