Python Forum
helping PyInstaller To Find files
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
helping PyInstaller To Find files
#1
Hey! I Have Problem I Am Using Pyinstaller To Make Exe But There Is Problem That I Have Some Ui files(because i am using pyqt5)
and i want to implement that if that files are not in folder that mainscript.py is then check it in Ui folder
Any Thoughts Plz?

Code I Thought:
def resource_path(relative_path):
        """ Get absolute path to resource, works for dev and for PyInstaller """
        try:
            # PyInstaller creates a temp folder and stores path in _MEIPASS
            base_path = sys._MEIPASS
        except Exception:
            base_path = os.path.abspath(".")

        return os.path.join(base_path, relative_path)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dijkstra algorithm helping find new space 1bumcheek 7 890 Jul-28-2023, 08:30 AM
Last Post: Gribouillis
  Using pyinstaller with .ui GUI files - No such file or directory error diver999 3 3,082 Jun-27-2023, 01:17 PM
Last Post: diver999
  Find duplicate files in multiple directories Pavel_47 9 2,928 Dec-27-2022, 04:47 PM
Last Post: deanhystad
  count every 28 files and find desire files RolanRoll 3 2,019 Dec-12-2021, 04:42 PM
Last Post: Axel_Erfurt
  Have to use Python 2.x to find "yesterday' files tester_V 6 2,771 Sep-19-2021, 12:26 AM
Last Post: tester_V
  find 'yesterdays files' tester_V 8 3,742 Jun-18-2021, 02:10 AM
Last Post: tester_V
  Find and replace in files with regex and Python Melcu54 0 1,825 Jun-03-2021, 09:33 AM
Last Post: Melcu54
  List of error codes to find (and count) in all files in a directory tester_V 8 3,585 Dec-11-2020, 07:07 PM
Last Post: tester_V
  Find specific subdir, open files and find specific lines that are missing from a file tester_V 8 3,489 Aug-25-2020, 01:52 AM
Last Post: tester_V
  python 3 find difference between 2 files pd007 2 2,079 May-22-2020, 01:16 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020