Changeset 3027


Ignore:
Timestamp:
Aug 25, 2017 12:16:49 PM (6 years ago)
Author:
odonnell
Message:

no wx dependency for export

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_CIF.py

    r3024 r3027  
    2727import copy
    2828import re
    29 import wx
    30 import wx.lib.scrolledpanel as wxscroll
    31 import wx.lib.resizewidget as rw
     29try:
     30    import wx
     31    import wx.lib.scrolledpanel as wxscroll
     32    import wx.lib.resizewidget as rw
     33except ImportError:
     34    # Avoid wx dependency for CLI
     35    class Placeholder(object):
     36        def __init__(self):
     37            self.BoxSizer = object
     38            self.Button = object
     39            self.Dialog = object
     40            self.ScrolledPanel = object
     41    wx = Placeholder()
     42    wxscroll = Placeholder()
    3243import GSASIIpath
    3344GSASIIpath.SetVersionNumber("$Revision$")
    3445import GSASIIIO as G2IO
    35 import GSASIIdataGUI as G2gd
    36 import GSASIIctrlGUI as G2G
     46try:
     47    import GSASIIdataGUI as G2gd
     48    import GSASIIctrlGUI as G2G
     49except ImportError:
     50    pass
    3751import GSASIImath as G2mth
    3852import GSASIIspc as G2spc
Note: See TracChangeset for help on using the changeset viewer.