Python Forum
I love the simplicity of Python but have a question
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I love the simplicity of Python but have a question
#1
Can Python code be compiled as an EXE say to run inside a Win Console window?

Jeff
Reply
#2
yes you can with numerous tools. PyInstaller has probably become the best lately.
https://python-forum.io/Thread-Building-...ith-Py2exe
Recommended Tutorials:
Reply
#3
It's not exactly compiling, but there are applications that can create an .exe out of a Python program.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#4
Yes,probably the best today is pyinstaller work Python 3.7.
There are several other,but eg py2exe did stoop develop at Python 3.4.
pynsist is packed a installer,also a GUI installer window with the normal next --> next until installed.
Reply
#5
Quote:It's not exactly compiling, but there are applications that can create an .exe out of a Python program.

How do they do that? For instance Python allocates enough memory to store a number (correct me if I'm wrong) as it gets it at runtime.

But if it were compiled, and I type a 90 digit number then the code would break..
Reply
#6
The executable binary file includes the interpreter and dependencies, if you prefer a one-file-executable. The interpreter runs the embedded Source Code or Byte Code.
It's still dynamic typed.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#7
Python, initially seems to bo the language I wish to learn. Just want to be able to share code(program) with another user who doesn’t have to execute a scrip with python on their computer.

I have a need to develop utility style programs to work with computations that output to simple text files.

Jeff
Reply


Forum Jump:

User Panel Messages

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