mirror of
https://github.com/Noettore/fattureCCSR.git
synced 2025-10-15 03:36:39 +02:00
fattureCCSR: python rewrite of downloader and integration with minimal gui. Initial commit
Signed-off-by: Ettore Dreucci <ettore.dreucci@gmail.com>
This commit is contained in:
25
utilities.py
Normal file
25
utilities.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import wx
|
||||
|
||||
def get_input_file(wildcard):
|
||||
"""Return the input file path"""
|
||||
_ = wx.App(None)
|
||||
style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST
|
||||
dialog = wx.FileDialog(None, "Scegli il .csv o .xml contenente le informazioni sulle fatture da importare", wildcard=wildcard, style=style)
|
||||
if dialog.ShowModal() == wx.ID_OK:
|
||||
path = dialog.GetPath()
|
||||
else:
|
||||
path = None
|
||||
dialog.Destroy()
|
||||
return path
|
||||
|
||||
def get_output_file(default_output_filename):
|
||||
"""Return the output file path"""
|
||||
_ = wx.App(None)
|
||||
style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT
|
||||
dialog = wx.FileDialog(None, "Scegli dove salvare il file TRAF2000", defaultFile=default_output_filename, style=style)
|
||||
if dialog.ShowModal() == wx.ID_OK:
|
||||
path = dialog.GetPath()
|
||||
else:
|
||||
path = None
|
||||
dialog.Destroy()
|
||||
return path
|
Reference in New Issue
Block a user