Re: Python LOC, .exe size, and refactoring
On Feb 22, 12:29 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Tue, 21 Feb 2012 19:51:07 -0800, CM wrote: I have an application that I was hoping to reduce a bit the size of its .exe when packaged with py2exe. I'm removing some Python modules such as Tkinter, etc., but now wonder how much I could size I could reduce by refactoring--and therefore shortening--my code. Well that will depend on how much you refactor it, but frankly, unless your code is truly awful, this will be a micro-optimization. py2exe bundles a Python runtime environment plus your files into a single exe file. Typically the runtime environment will be somewhere around 11MB for wxPython GUI apps (or 4MB with compression turned on, which will slow your application down). http://www.py2exe.org/index.cgi/SingleFileExecutable The runtime environment for Oracle's Java environment starts at 7MB and is typically 15MB, plus whatever libraries your own code produces. For dot-net applications, the framework can be up to 60MB. http://weblogs.java.net/blog/stanleyh/archive/2005/05/deployment_unde... http://www.hanselman.com/blog/SmallestDotNetOnTheSizeOfTheNETFramewor... While I think 60MB for a basic calculator app is taking the piss, this is 2011 not 1987 and we don't have to support floppy disks any more. 11MB for a GUI app is nothing to be worried about. That takes, what, 3 minutes to download even on a 512 kbps link? Is there a rule of thumb that predicts the relationship between the number of lines of Python code and the resultant size of the application (leaving aside the size of imported modules)? Yes. To a close approximation, for most applications: size of bundled application = ( size of Python runtime environment + size of libraries used ) Your code is most likely insignificant compared to the others. Or is there a way to roughly estimate how much would refactoring the code as much as I reasonably can help? (For example, in some cases there is some cut and paste coding...I know, it's bad). Look at it this way: take the .pyc file from your code. How big is it? Say, it's 200K. That's a BIG file -- the decimal module in the standard library is only 152K. Suppose you could cut it in half -- you would save 100K. Even if you could somehow cut it down to 1K, you've saved less than 200K. Do you care? Refactoring your code is double-plus good for maintainability. You should do it anyway. But don't do it to shrink an 11MB exe down to 10.8MB. -- Steven Thanks. All helpful advice. I'm coming in around 14 MB when you count some libraries, image files, etc., and I think I can live with that, considering I was able to reduce it from about 20 MB at one point by some excluding. Che -- http://mail.python.org/mailman/listinfo/python-list
Re: Python LOC, .exe size, and refactoring
On Wed, Feb 22, 2012 at 4:29 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: While I think 60MB for a basic calculator app is taking the piss, this is 2011 not 1987 and we don't have to support floppy disks any more. 11MB for a GUI app is nothing to be worried about. That takes, what, 3 minutes to download even on a 512 kbps link? There are other reasons for wanting to keep executable size down, though - low-memory VMs and such (of course, low-memory still means orders of magnitude more than yesterday's top-end box - the first computer I ever used, my dad bought the super-enormous 20MB hard disk option). But when you're looking at shrinking ... an 11MB exe down to 10.8MB then it's pretty moot. ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Re: Python LOC, .exe size, and refactoring
On Tue, 21 Feb 2012 19:51:07 -0800, CM wrote: I have an application that I was hoping to reduce a bit the size of its .exe when packaged with py2exe. I'm removing some Python modules such as Tkinter, etc., but now wonder how much I could size I could reduce by refactoring--and therefore shortening--my code. Well that will depend on how much you refactor it, but frankly, unless your code is truly awful, this will be a micro-optimization. py2exe bundles a Python runtime environment plus your files into a single exe file. Typically the runtime environment will be somewhere around 11MB for wxPython GUI apps (or 4MB with compression turned on, which will slow your application down). http://www.py2exe.org/index.cgi/SingleFileExecutable The runtime environment for Oracle's Java environment starts at 7MB and is typically 15MB, plus whatever libraries your own code produces. For dot-net applications, the framework can be up to 60MB. http://weblogs.java.net/blog/stanleyh/archive/2005/05/deployment_unde.html http://www.hanselman.com/blog/SmallestDotNetOnTheSizeOfTheNETFramework.aspx While I think 60MB for a basic calculator app is taking the piss, this is 2011 not 1987 and we don't have to support floppy disks any more. 11MB for a GUI app is nothing to be worried about. That takes, what, 3 minutes to download even on a 512 kbps link? Is there a rule of thumb that predicts the relationship between the number of lines of Python code and the resultant size of the application (leaving aside the size of imported modules)? Yes. To a close approximation, for most applications: size of bundled application = ( size of Python runtime environment + size of libraries used ) Your code is most likely insignificant compared to the others. Or is there a way to roughly estimate how much would refactoring the code as much as I reasonably can help? (For example, in some cases there is some cut and paste coding...I know, it's bad). Look at it this way: take the .pyc file from your code. How big is it? Say, it's 200K. That's a BIG file -- the decimal module in the standard library is only 152K. Suppose you could cut it in half -- you would save 100K. Even if you could somehow cut it down to 1K, you've saved less than 200K. Do you care? Refactoring your code is double-plus good for maintainability. You should do it anyway. But don't do it to shrink an 11MB exe down to 10.8MB. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On Sun, May 9, 2010 at 1:28 PM, Robin rob...@cnsp.com wrote: Does anyone know of a way I can make a python script into an exe that runs on windows7, I don't care if it is a python to c++ or python to c translator or anything like it. The version of python I am using is python 3.1. Thanks, The standard tools for that are: http://www.py2exe.org/ http://www.pyinstaller.org/ I'm unsure whether they work with Python 3.x or Windows 7 though; their websites don't say explicitly. They probably work with Windows 7. It's a bit less likely that they work with Python 3.x Perhaps someone who's tried those combinations will chime in. Cheers, Chris -- I'm on OS X myself, so... http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
2010/5/9 Robin rob...@cnsp.com: Does anyone know of a way I can make a python script into an exe that runs on windows7, I don't care if it is a python to c++ or python to c translator or anything like it. The version of python I am using is python 3.1. Thanks, -Robin -- http://mail.python.org/mailman/listinfo/python-list Hi, you may check e.g. cx-freeze http://cx-freeze.sourceforge.net/ which apparently supports python 3.1. However I don't use it myself, hence I can't offer any details. py2exe doesn't seem to have python 3 support just now. hth, vbr -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Gib Bogle wrote: Mark Lawrence wrote: I'm certain that members of the Guinea Pig Club might have something to say on that one, see :- http://en.wikipedia.org/wiki/Guinea_Pig_Club You mean, something like: That's not funny? No, simply a statement. -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Steven D'Aprano wrote: On Sun, 14 Mar 2010 11:20:15 +1300, Gib Bogle wrote: Mark Lawrence wrote: I'm certain that members of the Guinea Pig Club might have something to say on that one, see :- http://en.wikipedia.org/wiki/Guinea_Pig_Club You mean, something like: That's not funny? Or possibly That's hilarious!!!. Gallows humour is sometimes hard to predict. Thinking about it can be that's not funny or hilarious depending on context, which is rather difficult to give on this internet/webby thingy. -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On Mar 13, 1:45 pm, pyt...@bdurham.com wrote: Robin, do you of an alternate compilter it doesn't work (py2exe) on my windows 7 box I can assure you that Py2exe does work on Windows 7 (my firm develops commercial Python applications packaged using Py2exe running on Windows 7), but it does take a bit of fiddling and some patience. Join the py2exe newsgroup and post your problems there.https://lists.sourceforge.net/lists/listinfo/py2exe-users You may also want to google 'Gui2exe'. This is a free front-end to Py2exe that you can use to generate your Py2exe setup.py scripts. Note that Gui2exe requires wxPython (free) to run. Finally, make sure you are trying to compile 32-bit Python 2.x code. I don't think py2exe supports Python 3.x or 64-bit versions of Python yet. Nope; py2exe is pretty much the go-to tool for this. I hear great things about PyInstaller. The project is not dead - make sure you use the latest version in the SVN. Search stackoverflow.com for positive feedback and tips on PyInstaller. Its on our plate to take a good look this product 'one of these days'. Good luck! Malcolm I summarised a all the alternatives to py2exe I could find, here: http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdgoutput=html Looking for those with a green 'y' in the 'Windows' row, you want to check out cx_freeze, PyInstaller, bbfreeze. Best of luck. -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Jonathan, I summarised a all the alternatives to py2exe I could find, here: http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdgoutput=html Really great work - thanks for sharing this with all of us!!! Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
David Monaghan monaghand.da...@gmail.com writes: of Google. If they haven't used it, I don't really consider the gentle reminder that LMGTFY gives too harsh. If you do, you're too much of a gentle soul to be on the internet at all; someone might say Boo to you at any moment. Beware. I've no problem with lmgtfy. I *do* have a problem with hiding it behing a tinyurl. Why use 2 levels of obfuscating in a group that's about programming in a language that promotes clear coding? The message would have been the same if the OP had just copy pasted the Google link. But hey, that's way less funny. -- John Bokma j3b Hacking Hiking in Mexico - http://johnbokma.com/ http://castleamber.com/ - Perl Python Development -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On Sun, 14 Mar 2010 13:10:32 -0600, John Bokma j...@castleamber.com wrote: David Monaghan monaghand.da...@gmail.com writes: of Google. If they haven't used it, I don't really consider the gentle reminder that LMGTFY gives too harsh. If you do, you're too much of a gentle soul to be on the internet at all; someone might say Boo to you at any moment. Beware. Sorry. That last comment of mine was uncalled for. I've no problem with lmgtfy. I *do* have a problem with hiding it behing a tinyurl. Why use 2 levels of obfuscating in a group that's about programming in a language that promotes clear coding? The message would have been the same if the OP had just copy pasted the Google link. But hey, that's way less funny. Good point, although one could argue the unhidden response is just rude, but the masking does make it genuinely funny. DaveM -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
David Monaghan monaghand.da...@gmail.com writes: On Sun, 14 Mar 2010 13:10:32 -0600, John Bokma j...@castleamber.com wrote: David Monaghan monaghand.da...@gmail.com writes: of Google. If they haven't used it, I don't really consider the gentle reminder that LMGTFY gives too harsh. If you do, you're too much of a gentle soul to be on the internet at all; someone might say Boo to you at any moment. Beware. Sorry. That last comment of mine was uncalled for. Thanks. I've no problem with lmgtfy. I *do* have a problem with hiding it behing a tinyurl. Why use 2 levels of obfuscating in a group that's about programming in a language that promotes clear coding? The message would have been the same if the OP had just copy pasted the Google link. But hey, that's way less funny. Good point, although one could argue the unhidden response is just rude, but the masking does make it genuinely funny. One could argue, sure. But to me it's just the same as posting GFY (don't want to upset the tender soulds again with the F-word. -- John Bokma j3b Hacking Hiking in Mexico - http://johnbokma.com/ http://castleamber.com/ - Perl Python Development -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On Mar 14, 4:04 pm, David Monaghan monaghand.da...@gmail.com wrote: On Sun, 14 Mar 2010 13:10:32 -0600, John Bokma j...@castleamber.com wrote: David Monaghan monaghand.da...@gmail.com writes: of Google. If they haven't used it, I don't really consider the gentle reminder that LMGTFY gives too harsh. If you do, you're too much of a gentle soul to be on the internet at all; someone might say Boo to you at any moment. Beware. Sorry. That last comment of mine was uncalled for. I've no problem with lmgtfy. I *do* have a problem with hiding it behing a tinyurl. Why use 2 levels of obfuscating in a group that's about programming in a language that promotes clear coding? The message would have been the same if the OP had just copy pasted the Google link. But hey, that's way less funny. Good point, although one could argue the unhidden response is just rude, but the masking does make it genuinely funny. DaveM I thought the point of LMGTFY was to humorously and innocuously get across the point that a lot of basic questions can be answered instantly, or just a few key terms and a mouse click away (i.e. Was that so hard?) instead of having to write and post a message to a group and then wait for responses. In this sense, using LMGTFY *is* a memorable transmission of information beyond just the answer to the question. It is the meta-information of how to teach a man to fish. If someone LMGTFY'ed me due to my asking a really Googleable question, I'd feel I deserved this gentle ribbing and would make a note to be more diligent in my searches before asking a forum. -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On Sun, 14 Mar 2010 14:11:18 -0600, John Bokma wrote: One could argue, sure. But to me it's just the same as posting GFY (don't want to upset the tender soulds again with the F-word. Are you *still* going on about this thing? Sheesh. You've made your point. You don't think posting links to Let Me Google That For You is friendly; you think that hiding those links behind tinyurl is downright hostile; and you think that heaping abuse and obscenities on the person who posted the link is acceptable behaviour. You've made it abundantly clear that your concern about keeping this group friendly only applies to others, not to you. Can we move on now? -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Steven D'Aprano wrote: As the old proverb goes: give a man a fish, and you feed him for a day. Teach him how to fish, and he has food forever. I like this version: Light a man a fire, and you keep him warm for hours. Set a man on fire, and you keep him warm for the rest of his life. ;-) -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
* Gib Bogle: Steven D'Aprano wrote: As the old proverb goes: give a man a fish, and you feed him for a day. Teach him how to fish, and he has food forever. I like this version: Light a man a fire, and you keep him warm for hours. Set a man on fire, and you keep him warm for the rest of his life. ;-) Hey! I was going to post that! And there it was, in the next article... :-) Cheers, - Alf -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Gib Bogle wrote: Steven D'Aprano wrote: As the old proverb goes: give a man a fish, and you feed him for a day. Teach him how to fish, and he has food forever. I like this version: Light a man a fire, and you keep him warm for hours. Set a man on fire, and you keep him warm for the rest of his life. ;-) I'm certain that members of the Guinea Pig Club might have something to say on that one, see :- http://en.wikipedia.org/wiki/Guinea_Pig_Club -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Gib Bogle wrote: Steven D'Aprano wrote: As the old proverb goes: give a man a fish, and you feed him for a day. Teach him how to fish, and he has food forever. I like this version: Light a man a fire, and you keep him warm for hours. Set a man on fire, and you keep him warm for the rest of his life. ;-) I like Give a man a fish, and he eats for a day. Teach a man to fish and he will bore you with stories of the one that got away for the rest of his life. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
John Bokma wrote: Gabriel Genellina gagsl-...@yahoo.com.ar writes: On 13 mar, 00:26, Robin rob...@cnsp.com wrote: Does anyone know of a good python to stand alone exe compiler? http://tinyurl.com/... Wow, pathetic fuck. You don't have to post you know. And you don't have to give Google a second chance at indexing the URL, but we all make mistakes. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Robin, do you of an alternate compilter it doesn't work (py2exe) on my windows 7 box I can assure you that Py2exe does work on Windows 7 (my firm develops commercial Python applications packaged using Py2exe running on Windows 7), but it does take a bit of fiddling and some patience. Join the py2exe newsgroup and post your problems there. https://lists.sourceforge.net/lists/listinfo/py2exe-users You may also want to google 'Gui2exe'. This is a free front-end to Py2exe that you can use to generate your Py2exe setup.py scripts. Note that Gui2exe requires wxPython (free) to run. Finally, make sure you are trying to compile 32-bit Python 2.x code. I don't think py2exe supports Python 3.x or 64-bit versions of Python yet. Nope; py2exe is pretty much the go-to tool for this. I hear great things about PyInstaller. The project is not dead - make sure you use the latest version in the SVN. Search stackoverflow.com for positive feedback and tips on PyInstaller. Its on our plate to take a good look this product 'one of these days'. Good luck! Malcolm -- http://mail.python.org/mailman/listinfo/python-list
RE: python to exe
Does anyone know of a good python to stand alone exe compiler? Thanks, -Robin I tried several such tools and found the easiest one: Pyinstaller ( http://www.pyinstaller.org/ ) but it does not make your script faster, if you want it as fast as C language, please try PythoidC ( http://pythoidc.googlecode.com ) -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Mark Lawrence breamore...@yahoo.co.uk writes: I'm certain that members of the Guinea Pig Club might have something to say on that one, see :- http://en.wikipedia.org/wiki/Guinea_Pig_Club Interesting. My mum is a retired surgeon and in the mid 1980s she attended a course in plastic surgery and among other things she learnt that plastic surgery got going for real during WWII 'thanks' to all pilots with burns. I have forwarded the link above to her. /Martin -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Steven D'Aprano st...@remove-this-cybersource.com.au writes: As the old proverb goes: give a man a fish, and you feed him for a day. Teach him how to fish, and he has food forever. True, but you don't teach someone fishing by poking an eye out with a fishing rod. I'm an old-fashioned kind of guy, and don't like LMGTFY because it is tiresome and requires Javascript. I prefer: My reply had little to do with lmgtfy and all to do with hiding it behind tinyurl. But even then, why not do what you just did: give a URL to google directly. For quite some time I thought that comp.lang.perl.misc was quite unfriendly because of a certain attitude. comp.lang.python was quite a refreshment for a while: very newbie friendly, less pissing contests, etc. (but way more fanboism). Yesterday was a sady day: I finally had to conclude that it was only wishful thinking on my part; there is no difference. -- John Bokma j3b Hacking Hiking in Mexico - http://johnbokma.com/ http://castleamber.com/ - Perl Python Development -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Does anyone know of a good python to stand alone exe compiler? Thanks, -Robin I tried several such tools and found the easiest one: Pyinstaller ( http://www.pyinstaller.org/ ) Don't forget cx_freeze! I found it to work pretty easy, and it also works for py3k. Almar -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On 03/13/10 19:23, Steven D'Aprano wrote: On Sat, 13 Mar 2010 12:52:39 -0600, John Bokma wrote: For quite some time I thought that comp.lang.perl.misc was quite unfriendly because of a certain attitude. comp.lang.python was quite a refreshment for a while: very newbie friendly, less pissing contests, etc. (but way more fanboism). Yesterday was a sady day: I finally had to conclude that it was only wishful thinking on my part; there is no difference. You were the first one to inject abuse into this thread. There's a big difference between a mildly sarcastic link and dropping the F-word at one of the more helpful and respected members of the community. Perhaps you are projecting your own hostility and aggro onto others? John's thought process is a slippery slope and I make the same 'mistake' (notice the quotes please :-)) so often it would seem I won't learn it ever. However on the rare occasion I notice that I am making the mistake I say to myself: The view of a number of individuals do NOT necessarily represent the view of the majority unless proven otherwise by that actual majority. -- mph -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Mark Lawrence wrote: I'm certain that members of the Guinea Pig Club might have something to say on that one, see :- http://en.wikipedia.org/wiki/Guinea_Pig_Club You mean, something like: That's not funny? -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On Sat, 13 Mar 2010 12:52:39 -0600, John Bokma j...@castleamber.com wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: As the old proverb goes: give a man a fish, and you feed him for a day. Teach him how to fish, and he has food forever. True, but you don't teach someone fishing by poking an eye out with a fishing rod. I'm an old-fashioned kind of guy, and don't like LMGTFY because it is tiresome and requires Javascript. I prefer: My reply had little to do with lmgtfy and all to do with hiding it behind tinyurl. But even then, why not do what you just did: give a URL to google directly. For quite some time I thought that comp.lang.perl.misc was quite unfriendly because of a certain attitude. comp.lang.python was quite a refreshment for a while: very newbie friendly, less pissing contests, etc. (but way more fanboism). Yesterday was a sady day: I finally had to conclude that it was only wishful thinking on my part; there is no difference. There was a time, when the internet was young and most newbies couldn't find their own backsides with both hands, that your conclusions would be well placed.That time has long passed: Newsgroups are a long way down the hierarchy since those times and anyone turning up here nowadays _has_ heard of Google. If they haven't used it, I don't really consider the gentle reminder that LMGTFY gives too harsh. If you do, you're too much of a gentle soul to be on the internet at all; someone might say Boo to you at any moment. Beware. DaveM -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On Sun, 14 Mar 2010 11:20:15 +1300, Gib Bogle wrote: Mark Lawrence wrote: I'm certain that members of the Guinea Pig Club might have something to say on that one, see :- http://en.wikipedia.org/wiki/Guinea_Pig_Club You mean, something like: That's not funny? Or possibly That's hilarious!!!. Gallows humour is sometimes hard to predict. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On Fri, Mar 12, 2010 at 7:26 PM, Robin rob...@cnsp.com wrote: Does anyone know of a good python to stand alone exe compiler? py2exe: http://www.py2exe.org/ Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On 13 mar, 00:26, Robin rob...@cnsp.com wrote: Does anyone know of a good python to stand alone exe compiler? http://tinyurl.com/yfcfzz4 -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
Gabriel Genellina gagsl-...@yahoo.com.ar writes: On 13 mar, 00:26, Robin rob...@cnsp.com wrote: Does anyone know of a good python to stand alone exe compiler? http://tinyurl.com/yfcfzz4 Wow, pathetic fuck. You don't have to post you know. -- John Bokma j3b Hacking Hiking in Mexico - http://johnbokma.com/ http://castleamber.com/ - Perl Python Development -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On Fri, Mar 12, 2010 at 8:42 PM, robin rob...@cnsp.com wrote: On 3/12/2010 9:12 PM, Chris Rebert wrote: On Fri, Mar 12, 2010 at 7:26 PM, Robinrob...@cnsp.com wrote: Does anyone know of a good python to stand alone exe compiler? py2exe: http://www.py2exe.org/ do you of an alternate compilter it doesn't work (py2exe) on my windows 7 box, I hate windows7 THanks Robin Nope; py2exe is pretty much the go-to tool for this. Try asking on their mailinglist: https://lists.sourceforge.net/lists/listinfo/py2exe-users Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list
Re: python to exe
On Fri, 12 Mar 2010 22:26:34 -0600, John Bokma wrote: Gabriel Genellina gagsl-...@yahoo.com.ar writes: On 13 mar, 00:26, Robin rob...@cnsp.com wrote: Does anyone know of a good python to stand alone exe compiler? http://tinyurl.com/yfcfzz4 Wow, pathetic fuck. You don't have to post you know. Gabriel is one of the more helpful and newbie-friendly of the frequent posters on this newsgroup. Even if his actions were worthy of your abuse (and they aren't), he gets at least one Get Out Of Jail Free card for his long-term helpfulness. Speaking as somebody who finds Let Me Google That For You to be tiresome and not at all amusing, nevertheless I support Gabriel's actions. By merely giving Robin the answer, Robin doesn't learn how to find out the answer to simple questions himself, and by rewarding his laziness, we make a rod for our own back. As the old proverb goes: give a man a fish, and you feed him for a day. Teach him how to fish, and he has food forever. I'm an old-fashioned kind of guy, and don't like LMGTFY because it is tiresome and requires Javascript. I prefer: Google is your friend: http://www.google.com/search?q=python+standalone+exe Oh, and Robin, since you have apparently already tried py2exe and found it doesn't work on Windows 7, you should have said so from the start, instead of wasting everyone's time. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: Python-2.5.exe?
Andrew Burton wrote: What Python is best for installing to a USB Drive? I've actually got 2.5 on a drive, but I forget which installation package I used. It seems to me that it was an EXE file, but I cannot seem to find one of those today. Can the Python-2.5.msi installation files from python.org be installed so as not to touch the registry, to make them portable? python doesn't depend on the registry settings for normal use, so you can simply install python as usual, copy python25.dll from c:\windows\system32 to c:\python25, and then copy (or move) the entire c:\python25 tree to your USB drive. /F -- http://mail.python.org/mailman/listinfo/python-list
Re: Python-2.5.exe?
Andrew Burton wrote: What Python is best for installing to a USB Drive? I've actually got 2.5 on a drive, but I forget which installation package I used. Maybe this one ? http://www.voidspace.org.uk/python/movpy/ It seems to me that it was an EXE file, but I cannot seem to find one of those today. Can the Python-2.5.msi installation files from python.org be installed so as not to touch the registry, to make them portable? It seems movpy can install Python2.5 on an USB Key. A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list
Re: Python-2.5.exe?
Fredrik Lundh wrote: python doesn't depend on the registry settings for normal use, so you can simply install python as usual, copy python25.dll from c:\windows\system32 to c:\python25, and then copy (or move) the entire c:\python25 tree to your USB drive. Is it safe to assume that if you do this, Python first looks in C:\Python25 for the dll file, before trying to find the non-existent (on the USB drive) C:\Windows\System32? Thanks. -- http://mail.python.org/mailman/listinfo/python-list
Re: Python-2.5.exe?
John Salerno wrote: python doesn't depend on the registry settings for normal use, so you can simply install python as usual, copy python25.dll from c:\windows\system32 to c:\python25, and then copy (or move) the entire c:\python25 tree to your USB drive. Is it safe to assume that if you do this, Python first looks in C:\Python25 for the dll file, before trying to find the non-existent (on the USB drive) C:\Windows\System32? Python looks for a DLL in the same directory as the EXE before it looks anywhere else (this is standard Windows behaviour). /F -- http://mail.python.org/mailman/listinfo/python-list
Re: Python-2.5.exe?
John Salerno schrieb: Is it safe to assume that if you do this, Python first looks in C:\Python25 for the dll file, before trying to find the non-existent (on the USB drive) C:\Windows\System32? python25.dll is found through mechanisms of the operating system, not through code in Python. The operating system loads DLLs in the order specified here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/dynamic-link_library_search_order.asp As you can see, the directory containing the application is searched first. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list
Re: Python-2.5.exe?
Fredrik Lundh [EMAIL PROTECTED] wrote: Andrew Burton wrote: What Python is best for installing to a USB Drive? I've actually got 2.5 on a drive, but I forget which installation package I used. It seems to me that it was an EXE file, but I cannot seem to find one of those today. Can the Python-2.5.msi installation files from python.org be installed so as not to touch the registry, to make them portable? python doesn't depend on the registry settings for normal use, so you can simply install python as usual, copy python25.dll from c:\windows\system32 to c:\python25, and then copy (or move) the entire c:\python25 tree to your USB drive. As well as the above, I find a little .bat file like this to set some paths and start python or your application is helpful, eg @echo off set DEMOHOME=%CD% set PYTHONHOME=%DEMOHOME%\Python24 set PYTHONPATH=%PYTHONHOME%;%DEMOHOME%\Demo\Python set PYTHON=%PYTHONHOME%\python.exe set PYTHONW=%PYTHONHOME%\pythonw.exe set PATH=%PYTHONHOME%;%PATH% start Demo %PYTHONW% demo.pyw -- Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick -- http://mail.python.org/mailman/listinfo/python-list