Python Forum
Make a Python program executable in Windows
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make a Python program executable in Windows
#2
Often the python installation will associate the ".py" extension with your python interpreter. So you just need to double-click on it in explorer. If you output text though, beware the window will disappear after the program exits. So if you want to see data you've print()ed at the end, you might end the program with something like:
input("Press enter to end the program")
so the window doesn't go away until you're done looking at the data. Wouldn't be a problem with tkinter where you normally exit explicitly.

You could also just type python <myprogram.py> from a command window.
Reply


Messages In This Thread
RE: Make a Python program executable in Windows - by bowlofred - Sep-26-2020, 12:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to compile a Python script for a Windows / Linux executable? netanelst 2 1,350 May-24-2022, 07:02 AM
Last Post: netanelst
  Is it possible to make a program recognize how many clicks it has had on the monitor? jao 0 1,162 Feb-25-2022, 06:31 PM
Last Post: jao
  Python executable Script (Wrapper) Hwang 2 1,907 Jan-12-2022, 06:53 PM
Last Post: Hwang
  No module named '_cffi_backend' error with executable not with python script stephanh 2 5,684 Nov-25-2021, 06:52 AM
Last Post: stephanh
  How to make a Vocal synthesizer program on Python? Seadust 3 3,591 Jan-28-2021, 06:26 PM
Last Post: gonnach
  How to really use this youtube-upload program in Windows? Jacksonsteel 1 1,656 Dec-18-2020, 07:38 PM
Last Post: snippsat
  Python 3.7, Windows 10, pyinstaller, winsound, no sound in executable kmarien 3 3,683 Nov-30-2020, 04:10 PM
Last Post: buran
  How to make a Python program run in a dos shell (cmd) Pedroski55 2 2,337 Nov-09-2020, 10:17 AM
Last Post: DeaD_EyE
  I try to make Heron formula program abcd 7 3,440 Oct-22-2020, 12:48 AM
Last Post: abcd
  Executable looks like virus to windows samuelbachorik 4 3,044 Apr-27-2020, 02:46 PM
Last Post: samuelbachorik

Forum Jump:

User Panel Messages

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