Merge branch 'master' of https://github.com/itsayellow/Phoenix into itsayellow-master

This commit is contained in:
Robin Dunn
2017-08-04 10:11:41 -07:00

View File

@@ -7,21 +7,21 @@
wx.ICON_QUESTION | wx.YES_NO, self) == wx.NO:
return
# else: proceed asking to the user the new file to open
# else: proceed asking to the user the new file to open
openFileDialog = wx.FileDialog(self, "Open XYZ file", "", "",
"XYZ files (*.xyz)|*.xyz", wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
if openFileDialog.ShowModal() == wx.ID_CANCEL:
return # the user changed idea...
openFileDialog = wx.FileDialog(self, "Open XYZ file", "", "",
"XYZ files (*.xyz)|*.xyz", wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
if openFileDialog.ShowModal() == wx.ID_CANCEL:
return # the user changed idea...
# proceed loading the file chosen by the user
# this can be done with e.g. wxPython input streams:
input_stream = wx.FileInputStream(openFileDialog.GetPath())
if not input_stream.IsOk():
wx.LogError("Cannot open file '%s'."%openFileDialog.GetPath())
return
# proceed loading the file chosen by the user
# this can be done with e.g. wxPython input streams:
input_stream = wx.FileInputStream(openFileDialog.GetPath())
if not input_stream.IsOk():
wx.LogError("Cannot open file '%s'."%openFileDialog.GetPath())
return