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 import internal_from_wxstring |
31 |
from Thuban.UI.command import registry, Command |
from Thuban.UI.command import registry, Command |
32 |
from Thuban.UI.mainwindow import main_menu |
from Thuban.UI.mainwindow import main_menu |
33 |
from Thuban import _ |
from Thuban import _ |
124 |
|
|
125 |
context -- The Thuban context. |
context -- The Thuban context. |
126 |
""" |
""" |
127 |
dlg = wxFileDialog(context.mainwindow, |
dlg = wx.FileDialog(context.mainwindow, |
128 |
_('Select GNS file'), '.', '', |
_('Select GNS file'), '.', '', |
129 |
_('Generate Files (*.txt)|*.txt|') + |
_('Generate Files (*.txt)|*.txt|') + |
130 |
_('All Files (*.*)|*.*'), |
_('All Files (*.*)|*.*'), |
131 |
wxOPEN|wxOVERWRITE_PROMPT) |
wx.OPEN|wx.OVERWRITE_PROMPT) |
132 |
if dlg.ShowModal() == wxID_OK: |
if dlg.ShowModal() == wx.ID_OK: |
133 |
gns_filename = dlg.GetPath() |
gns_filename = internal_from_wxstring(dlg.GetPath()) |
134 |
dlg.Destroy() |
dlg.Destroy() |
135 |
else: |
else: |
136 |
return |
return |