|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am new to python and i was wondering how to make a program run without having to install python
please help! |
|
#2
|
|||
|
|||
|
Look at how 2 py2exe
Contributed by grim and mark |
|
#3
|
||||
|
||||
|
Heres the link to Py2exe's home page, you should be able to find everything you need there although we are assuming that you are in Windows, and have Python installed; Py2exe requires Python!
http://starship.python.net/crew/theller/py2exe/ If you have any problems with this then run a quick search on the forum... Py2exe has been discussed many, many, many, many times .If you're on a *nix OS then you should look here: http://starship.python.net/crew/atuining/cx_Freeze/ Have a good day all, Mark. |
|
#4
|
|||
|
|||
|
thankyou
! I couldent figure it out ![]() |
|
#5
|
|||
|
|||
|
They're conning you.
You can't make it run without installing Python - all py2exe does is install Python within the EXE. ![]() |
|
#6
|
|||
|
|||
|
Are you sure sfb? will this make the program size bigger?
|
|
#7
|
||||
|
||||
|
Quote:
sfb, conning, me? really? I stated very clearly that py2exe requires Python to be installed, which makes sence since py2exe is a Python program itself. However once you have compiled a Python program using py2exe you can run this without having to install Python! But you are right though in a way, py2exe works by wrapping the Python interpreter inside the exe file - this is not installing... http://www.dictionary.com/ For all intents and perposes, this is a stand alone exe like any other! Hope this clears things up, Mark. Last edited by netytan : July 2nd, 2004 at 03:25 PM. |
|
#8
|
|||
|
|||
|
How much bigger does it make the program ?
|
|
#9
|
||||
|
||||
|
Considerably bigger than the equivalent C/C++ program, but then thats to be expected. I don't really have a means to test this right now but if im remembering correctly then this adds aprox 1MB to the exe's size. As aposed to perl2exe which adds a good 4MB to the size of it's exe's.
But the gains outway cost in most cases! Which is why more and more people are using it. Though this seems irrelevant really (more so on *nix since Python is usually included) because Python should really be installed if you want to run Python programs. And if anyones interested i can give reasons but this is.. just my opinion ,Have a good day, Mark. Last edited by netytan : July 3rd, 2004 at 03:35 AM. |
|
#10
|
|||
|
|||
|
Quote:
Not really conning; I was being silly: "I'd like a car without a CD Player, please" "Sure, we'll, er, put the CD player in the boot then, OK?" "Great!" etc. ![]() |
|
#11
|
||||
|
||||
|
Haha, ok ok, your a little crazy
. But still, not a problem. Have fun . |
|
#12
|
|||
|
|||
|
It is worth pointing out that what has been said here for Python is just as true for other languages such as Java. There are Java equivalents to py2exe that will bundle the bytecode files with the entire Java runtime to create an installable program, and in my experience the size of a Python program created with py2exe is likely to be far less than the Java equivalent. Visual Basic used to do the same thing, and while I believe that it now compiles to native code, it still needs to bundle the runtime DLLs with it. Even if you create a Windows program in C++ you may still need to install all the runtime DLLs that it uses (depending on the compilation options and what libraries you use). The days when a program consisted of a single executable are long gone, at least on Windows systems.
Dave - The Developers' Coach |
|
#13
|
|||
|
|||
|
Quote:
I just tried py2exe on a minimal program of print "hello world" and the total size is 1.21Mb. This sounds a lot, but I have seen C++ compilers that generate executables of a similar size for the same thing. The actual exe was only 20 Kb, and the bulk of the size was taken up with the python23.dll file at 952 Kb. I then used the freeware InnoSetup program (http://www.innosetup.com) to compress everything into a self-installing exe, which was 683 Kb. If you are worried about bandwidth, this is all that the user would have to download. I believe this compares favourably with most other languages. To give you an idea of how big real-world programs would be, I have used the combination of py2exe and InnoSetup on a fairly complex Python program using the wxPython GUI library and several other third-party libraries, and the final installer was still under 3Mb. The uncompressed files were around 11 Mb, including 5Mb for the wxPython DLLs. Dave - The Developers' Coach |
|
#14
|
|||
|
|||
|
Thankyou
it is a shame it increses the program size again, thankyou ![]() |
|
#15
|
|||
|
|||
|
Quote:
|