Can a menu link open an .exe

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Dharker
Regular
Posts: 98
Joined: Sun Sep 15, 2013 6:45 am
Contact:

Can a menu link open an .exe

#1 Post by Dharker » Wed Sep 07, 2016 6:38 am

Hi,

I am curious if there is a renpy command line that could be used to open a .exe file.

For example renpy already has the option to open html pages.
Would it instead be possible to set a menu item that might close the current game bypassing the are you sure option and run an exe file.

This may seem an odd request, but in steam DLC is created by adding the dlc files to the game folder, it however doesnt allow for a stand alone play button. So if i want to release a mini stand alone game as dlc, there is currently no way to play that game. So instead ideally, if i could have a main menu item that can run that .exe file that would be ideal.

Thanks.
Hope that makes sense.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Can a menu link open an .exe

#2 Post by xela » Wed Sep 07, 2016 7:45 am

Check Python's os module.
Like what we're doing? Support us at:
Image

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Can a menu link open an .exe

#3 Post by PyTom » Fri Sep 09, 2016 6:20 pm

Actually, the subprocess module is probably better than using os.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Can a menu link open an .exe

#4 Post by xela » Fri Sep 09, 2016 8:19 pm

Noted. It came up when I googled this but os examples seemed so much simpler :D
Like what we're doing? Support us at:
Image

Post Reply

Who is online

Users browsing this forum: No registered users