Changeset 4249


Ignore:
Timestamp:
Jan 12, 2020 3:52:53 PM (22 months ago)
Author:
toby
Message:

fix bug version in PIL/pillow

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4238 r4249  
    344344    print ("  scipy:      %s"%sp.__version__)
    345345    print ("  OpenGL:     %s"%ogl.__version__)
    346     # TODO: not sure this prints the right message with pillow
     346    Image = None
     347    version = '?'
    347348    try:
    348349        from PIL import Image
    349         try:
    350             from PIL import PILLOW_VERSION
    351             version = PILLOW_VERSION
    352         except:
    353             version = Image.VERSION
    354         print ("  PIL.Image:  %s"%version)
    355350    except ImportError:
    356351        try:
    357352            import Image
    358             print ("Image (PIL):%s"%Image.VERSION)
    359353        except ImportError:
    360             print ("Image module not present; Note that PIL (Python Imaging Library) or pillow is needed for some image operations")
     354            pass
     355    if Image is None:
     356        print ("Image module not present; Note that PIL (Python Imaging Library) or pillow is needed for some image operations")
     357    else:
     358        # version # can be in various places, try standard dunderscore first
     359        for ver in '__version__','VERSION','PILLOW_VERSION':
     360            if hasattr(Image,ver):
     361                try:
     362                    version = eval('Image.'+ver)
     363                    break
     364                except:
     365                    pass
     366        print ("  Image:      %s (PIL or Pillow)"%version)
    361367    print ("  Platform:   %s %s %s"%(sys.platform,platform.architecture()[0],platform.machine()))
    362368    try:
  • trunk/docs/source/index.rst

    r3858 r4249  
    99GSAS-II works, or for people wishing to develop scripting applications
    1010using the API (:mod:`GSASIIscriptable`).
     11
     12For information on obtaining or learning to use GSAS-II, please see
     13the information on the GSAS-II home page:
     14https://subversion.xray.aps.anl.gov/trac/pyGSAS
     15and pages referenced there.
    1116
    1217Contents
Note: See TracChangeset for help on using the changeset viewer.