select_file_gui.py
Go to the documentation of this file.
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5  Select File Gui Class
6 """
7 
8 from PyQt5 import QtWidgets
9 
10 
12  """
13  Select File Gui Class
14  """
15 
16  @classmethod
17  def get_file_path(cls, caption="Open File", filefilter="", is_app=False):
18  """
19  "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"
20  """
21 
22  if not is_app:
23  import sys
24  QtWidgets.QApplication(sys.argv)
25 
26  files = QtWidgets.QFileDialog.getOpenFileNames(caption=caption, filter=filefilter)
27  file_list = list()
28 
29  for file in files:
30  file_list.append(str(file))
31 
32  return file_list
def get_file_path(cls, caption="Open File", filefilter="", is_app=False)


phm_start
Author(s):
autogenerated on Thu Aug 13 2020 16:41:50