25 |
|
|
26 |
# only import GUI and register when not called as command line tool |
# only import GUI and register when not called as command line tool |
27 |
if __name__ != '__main__': |
if __name__ != '__main__': |
28 |
from wxPython.wx import * |
import wx |
29 |
|
|
30 |
from Thuban.UI.command import registry, Command |
from Thuban.UI.command import registry, Command |
31 |
from Thuban.UI.mainwindow import main_menu |
from Thuban.UI.mainwindow import main_menu |
123 |
|
|
124 |
context -- The Thuban context. |
context -- The Thuban context. |
125 |
""" |
""" |
126 |
dlg = wxFileDialog(context.mainwindow, |
dlg = wx.FileDialog(context.mainwindow, |
127 |
_('Select GNS file'), '.', '', |
_('Select GNS file'), '.', '', |
128 |
_('Generate Files (*.txt)|*.txt|') + |
_('Generate Files (*.txt)|*.txt|') + |
129 |
_('All Files (*.*)|*.*'), |
_('All Files (*.*)|*.*'), |
130 |
wxOPEN|wxOVERWRITE_PROMPT) |
wx.OPEN|wx.OVERWRITE_PROMPT) |
131 |
if dlg.ShowModal() == wxID_OK: |
if dlg.ShowModal() == wx.ID_OK: |
132 |
gns_filename = dlg.GetPath() |
gns_filename = dlg.GetPath() |
133 |
dlg.Destroy() |
dlg.Destroy() |
134 |
else: |
else: |