Skip to content

Commit 0f89a97

Browse files
committed
minor CIFexport cleanup
1 parent cb160fc commit 0f89a97

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

GSASII/exports/G2export_CIF.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
import re
1414
interactive = False
1515
try:
16+
# TODO: code that calls wx should be hidden in GUI modules that are imported only when needed
1617
import wx
1718
import wx.lib.scrolledpanel as wxscroll
1819
import wx.lib.resizewidget as rw
1920
interactive = True
2021
except ImportError:
21-
G2G = None
22+
G2G = None # used in Project export
2223
# Avoid wx dependency for Scriptable
2324
class Placeholder(object):
2425
def __init__(self):
@@ -4684,8 +4685,10 @@ def Exporter(self,event=None,seqData=None,Controls=None):
46844685
except ImportError:
46854686
try:
46864687
from .. import CifFile as cif # PyCifRW, as distributed w/G2 (old)
4688+
cif
46874689
except ImportError:
46884690
msg = 'The PyCifRW package is not installed. CIF templates cannot be accessed. Created CIFs will be incomplete'
4691+
from .. import GSASIIctrlGUI as G2G
46894692
G2G.G2MessageBox(self.G2frame,msg,'no PyCifRW')
46904693
self.CIFname = ''
46914694
self.seqData = seqData

0 commit comments

Comments
 (0)