Skip to content

Commit f4e280a

Browse files
committed
change the Ipython traceback report; cosmetics
1 parent be8a11b commit f4e280a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

GSASII/GSASIIdataGUI.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3768,8 +3768,9 @@ def OnImageSum(self,event):
37683768
def OnAddPhase(self,event):
37693769
'Add a new, empty phase to the tree. Called by Data/Add Phase menu'
37703770
PhaseName = ''
3771-
dlg = wx.TextEntryDialog(None,'Enter a name for this phase','Phase Name Entry','New phase',
3771+
dlg = wx.TextEntryDialog(self,'Enter a name for this phase','Phase Name Entry','New phase',
37723772
style=wx.OK)
3773+
dlg.CenterOnParent()
37733774
if dlg.ShowModal() == wx.ID_OK:
37743775
PhaseName = dlg.GetValue()
37753776
self.CheckNotebook()
@@ -4415,7 +4416,7 @@ def OnFileSave(self, event):
44154416

44164417
def OnNewGSASII(self, event):
44174418
'''Gets a GSAS-II .gpx project file in response to the
4418-
File/Open new window menu button. Runs only on Mac.
4419+
File/Open new window menu button.
44194420
'''
44204421
if self.LastGPXdir:
44214422
pth = self.LastGPXdir

GSASII/GSASIIpath.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,10 @@ def exceptHook(*args):
11351135
import IPython.core
11361136
savehook = sys.excepthook # save the exception hook
11371137
# show the error
1138-
tb_formatter = IPython.core.ultratb.VerboseTB()
1138+
# TODO: define a config var that allows selection between the following:
1139+
#tb_formatter = IPython.core.ultratb.VerboseTB()
1140+
tb_formatter = IPython.core.ultratb.FormattedTB()
1141+
#tb_formatter = IPython.core.ultratb.ListTB()
11391142
print(tb_formatter.text(*args))
11401143
# get the Ipython shell routine
11411144
if IPython.core.getipython.get_ipython() is None:

0 commit comments

Comments
 (0)