[GH-ISSUE #233] Is it possible to add another .exe file to run in the same file? #209

Closed
opened 2026-02-26 12:20:50 +03:00 by kerem · 1 comment
Owner

Originally created by @zkita on GitHub (Jan 20, 2022).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/233

Is it possible to add another .exe file to run in the same file?

Originally created by @zkita on GitHub (Jan 20, 2022). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/233 Is it possible to add another .exe file to run in the same file?
kerem closed this issue 2026-02-26 12:20:50 +03:00
Author
Owner

@brentvollebregt commented on GitHub (Jan 22, 2022):

You can add an exe by adding it to --add-binary, for example:

image

Then to call it, you will need the resource_path helper function:

def resource_path(relative_path):
    """ Get absolute path to resource, works for dev and for PyInstaller """
    base_path = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__)))
    return os.path.join(base_path, relative_path)

And then call it:

os.popen(resource_path('lib/example.exe'))

This example is from https://stackoverflow.com/a/50914550

Of course, you can access it other ways, but this is just an example.

<!-- gh-comment-id:1019020126 --> @brentvollebregt commented on GitHub (Jan 22, 2022): You can add an exe by adding it to --add-binary, for example: ![image](https://user-images.githubusercontent.com/19944838/150621274-6016f634-bd71-4b51-bcdf-8d8bdbd4ca0b.png) Then to call it, you will need the `resource_path` helper function: ```python def resource_path(relative_path): """ Get absolute path to resource, works for dev and for PyInstaller """ base_path = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__))) return os.path.join(base_path, relative_path) ``` And then call it: ```python os.popen(resource_path('lib/example.exe')) ``` > This example is from https://stackoverflow.com/a/50914550 Of course, you can access it other ways, but this is just an example.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#209
No description provided.