Domain: mcmillan-inc.com
Stories and comments across the archive that link to mcmillan-inc.com.
Comments · 7
-
Re:Silly trolling article writer.
I've found the more flexible solution to creating an executable is to use McMillan's installer with UPX. I can create a distributable wxPython app at approximately 2MB with this combination.
Python is lacking in several important areas: Multimedia (i.e., QuickTime integration) and wxPython's lack of a decent rich text widget were enough to force me to use Tcl.
Steve -
Re:Anything but odd/new language...
"It's a good rant but it's not really very relevent - writing your app in python (at least in the way he describes) simply isn't plausible if you're writing an app for commercial or even mass distribution - you can't rely on an existing Python installation and if you've got to package one with your installer then theres hardly any more work to embed an interperter instead."
This is old enough it will probably never be read, but that isn't true. There are utilites that do this in a snap, in addition to finding any extension package or dll deps that your python is using automagically in almost all cases. Just today I took a small app written in python using WxWindows ran it through py2exe and it runs on all flavors of windows, without python or wxWindows libs installed on either one. Took me about ten minutes.
McMillian Installer will do the same trick, tho I haven't used it recently. Mcmillan also does the same thing for Linux, where I wish a lot more people were making packages available as no dep binaries as well as more traditional source packages, but that is just me.
Now, as for your other points, if you happen to want to write your code in Python, well, that is a different matter. But if you choose to, it is very easy and fast to distibute your program binary without deps.
-
Python standalonesThere are actually several ways to make standalone executables of Python programs; the one I use is Gordon McMillan's Installer, which basically packages up the needed DLLs, libraries, etc. and puts on an exectuable wrapper. It's cross-platform, though not unreasonably you have to compile on Windows to get a Windows exe and on your other platforms to get executables for those. There are others compiling options, the linked page includes a nice list of them with summaries.
Python can also be fairly well optimized; I have a strong suspicion that the slashdotting of trackers is more a bandwidth issue than a processing capacity issue. It's also quite possible (caveat: I haven't read the code yet) that the internal structure placed a higher priority on readability and maintainability than on processing efficiency - I know I've written server applications using that approach, because I'd rather spend an extra $500 on hardware upgrades if more power is needed than an extra $5000 later on additional maintenance, debugging and testing.
Finally, on the issue of speed: a lot of what a tracker does involves managing lists, hash tables, etc. - the type of thing that's built into Python and highly-optimized. It's like someone's discovery when VB5 or VB6 came out that a VB program was faster at some tasks than a corresponding C++ program, because all the processing was being done using very heavily optimized builtins - if you're running a relatively inefficient scripting language but using it to call highly-optimized native code, you may not see the performance degradation that you might expect.
-
Depends on the level of computer literacy ...
-
Other Alternatives
Macromedia deserves some credit for staying in tune with the development world. But lets face it: Flash is for art majors. Even with its "standard" controls that are now available (e.g., scrolling text box), it is still a difficult environment to control; you always feel like "this could look so much better with this spinning, pulsing button." All those vector calculations in Flash still bring a PII to its knees. If people are interested in Web applications, they migh consider Runtime Revolution, a cheap ($300) cross-platform (Mac, Win, Linux, etc.) alternative with native support for sockets and other amazing tools, including multimedia support, that really allow you to accomplish what needs to be done. I've spent a LOT of time trying to find the right rapid application developement tools for the job, and Runtime Revolution has yet to be beat. Python with Boa Constructor (v
.2) and Mcmillan installers is certainly awesome, but the multimedia (i.e., Quicktime) just isn't there yet. In other words, there are a lot of very nice alternatives to Flash, which is really not much more than a glorified banner advertisement tool. -
Wow, I'm really surprisedTooting the Python horn a little then, there are at least two good and free ways to generate executables from Python programs. There was a good-sized discussion of this on comp.lang.python in early January.
The two most dominant options appear to be py2exe and Gordon McMillan's Installer, which also has a nice summary of other options as well. I personally use Installer and find it to work just fine; that said I don't have any experience with its GUI capabilities - I know it's supposed to have decent support for the common Python GUI techniques, but all my stuff is command-line driven.
-
Python is a GREAT language, but. . .Python is an excellent languange that I've been using for about 8 months now. Anyone who has ever programmed before can pick it up easily just by reading the [very thorough] documentation at python.org. It also has an rabid support base via newsgroup, who are excellent at answering questions.
That said, I don't know if I would teach a begining computer science course in python. At my University, our general intro to CSE involves a two class series teaching generic basic theory wrapped around a programming language. We used to teach them with C and C++ but just recently moved to Java. I have been a TA for these classes before. Based on my experiences, I think there are both pluses and minuses to the idea of teaching these classes in python.
Benefits:- Python is extremely easy to learn, as mentioned before. Much easier than C, C++, or Java.
- Python works really well with Tk, which would make it easy to build out skeleton code (multiplatform skel code at that) for the students using windowing and graphics. Students are 100% happier if they can see what they're working on reflected graphically. Makes it more fun to show off. This is why our projects usually include basic games.
- BASIC Python is truly, completely, multiplatform, working identically on Mac, Win*, and *nix. Some specialized functions in modules don't support all platforms, but nothing that would be important to a begining student. Support issues would be MUCH simpler than C or C++. God, we had huge headaches trying to support MSVC, CodeWarrior, CodeWright, Borland, etc. . .
- There is a great installer script available that will build python modules into either standalone exe's or distributable directories. (Available here if you've never seen this before)
- I have yet to find a solid dev environment that includes a great debugger. Yes, emacs can be set up to help a bit, and the default program included with the windows install is ok (albiet a bit flaky), but I would want a rock solid, easy to use complete dev studio for my students.
- I REALLY dislike any language that depends on white space. Miranda and Haskell are two other examples of this. Its a pain to move blocks around and anyone who doesn't use an editor with auto-indent is screwed. Also, unless tabs are set to spaces, computers with differnt tab stops will see your code differently, which can be a problem if code is emailed, etc.
- As has already been mentioning, not too much one can teach about memory management and pointers with python. . .
- Sounds kinda strange as a complaint, but too much is built in. I have this complaint about java too. As an example, I would much rather have an early homework be a sorting algorithm and then have them reuse this algorithm in other homeworks than let them just type "xxx.sort()". Not that this isn't a great feature for experienced programmers, its just that begining students should have to do sorting, reversing, duplicating, etc themselves at first.
Looking away from basic intro classes, python is great to know. I did a lot of AI code sketches in python, and have used it to slap together simple programs at work. However, I would consider it a tool to be learned after the basics have been beat in. If I had learned python first, it would be a lot harder to force me to do everything in C later. :o)
-s