#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Location
    neer Newcastle, England
    Posts
    12
    Rep Power
    0

    Unhappy Stand alone programs


    I am new to python and i was wondering how to make a program run without having to install python please help!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    57
    Rep Power
    11
    Look at how 2 py2exe
    Contributed by grim and mark
  4. #3
  5. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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.
    programming language development: www.netytan.com Hula

  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Location
    neer Newcastle, England
    Posts
    12
    Rep Power
    0

    Talking Thanks


    thankyou ! I couldent figure it out
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    624
    Rep Power
    35
    They're conning you.

    You can't make it run without installing Python - all py2exe does is install Python within the EXE.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Location
    neer Newcastle, England
    Posts
    12
    Rep Power
    0
    Are you sure sfb? will this make the program size bigger?
  12. #7
  13. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Originally Posted by netytan
    we are assuming that you are in Windows, and have Python installed; Py2exe requires Python!
    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.
    programming language development: www.netytan.com Hula

  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    37
    Rep Power
    11
    How much bigger does it make the program ?
  16. #9
  17. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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.
    programming language development: www.netytan.com Hula

  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    624
    Rep Power
    35
    Originally Posted by netytan
    sfb, conning, me? really?
    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.

  20. #11
  21. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Haha, ok ok, your a little crazy . But still, not a problem. Have fun .
    programming language development: www.netytan.com Hula

  22. #12
  23. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    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
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    Originally Posted by Noah_C
    How much bigger does it make the program ?
    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
  26. #14
  27. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Location
    neer Newcastle, England
    Posts
    12
    Rep Power
    0

    Thumbs up Thancks


    Thankyou

    it is a shame it increses the program size

    again, thankyou
  28. #15
  29. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    366
    Rep Power
    11

    Unhappy help


    Originally Posted by netytan
    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.
    Hi im new to programing... i made a little program and want to use py2exe to convert it, but cant figure out how some help please

IMN logo majestic logo threadwatch logo seochat tools logo