Domain: python.org
Stories and comments across the archive that link to python.org.
Comments · 1,513
-
Trying to predict the next 2 years...Being regular Python user/fan, each news, which features Python makes me happy. How do you think, will Python become more and more popular in the next years? I think so.
- web development: Not only Zope and Plone, there's a lot of interesting development going on with Twisted... and, well, Twisted is not only about the web, it is about networking in general;
- .NET / Java development in general: Python in Java exists already... Java gaining more and more popularity? No problem, Python is already there.
.NET/Mono taking the market away from Java? The industry will perhaps support more and more .NET techniques - with IronPython (featured recently on /.), Python is already there. No problem; - some people might wonder if you really need that stinkin'
.NET/Java stuff at all - Python is already very portable, but that's not everything - it already supports a wide range of MacOS/Unix/win32-specific functionalities. - anything else makes you wonder, if Python is a good choice at all? What about realtime applications, like a VOIP phone (GUI included, win32/unix compatible) in Python? Do you read "interpreted" as "slow", do you wonder if Python is good enough to be useful in CPU-demanding programs like games? Anything else against it? Perhaps you're worried about Python's extensibility?
- if software telephony sucks for you, perhaps you should try a real mobile phone
;) -
Psyco
* Fast - IronPython-0.2 is 1.4x faster than Python-2.3 on the standard pystone benchmark.
I don't know about pystone in particular, but Psyco (a dynamic compiler module that essentially replaces the Python interpreter's inner loop at runtime) tends to make code run much faster than that and can speed up algorithmic code tenfold or more.
When running with Psyco, quicksort written in Python is actually faster than Python's built-in C mergesort! -
Re:Compiled Python
I haven't worked with Python yet though I plan to take a look at it soon. I know it is a scripting language but is there a way to compile it into native executable form?
"You don't need the ability to compile Python to C code if all you want is a stand-alone program that users can download and run without having to install the Python distribution first. There are a number of tools that determine the set of modules required by a program and bind these modules together with a Python binary to produce a single executable..." Read More -
Computers and Math
Computer programming requires a very intuitive grasp of boolean logic (Discrete math), symbolic logic (Algebra) and set theory (Discrete math again). Also, a good short to mid term memory is more important than intelligence. For many people, programming is a state of mind.
For example, the speed of a bubble sort is O(n^2). A trivial bubble sort has to iterate over a list for every element in that list. So, assuming n items in the list, the bubble sort needs to go through the list n times, each time going through the list (in a nested loop) n times. Giving you a speed of n*n, or n^2. Anyway, a merge sort is O(n*log(n)), but it requires 2n memory, whereas a bubble sort is done in n memory. So, which would be better for your application?
Network administration usually also requires a bit of math.
For example, the IP addresses 10.1.1.1 and 10.1.5.8 are in the subnet 255.255.248.0. To do this, I converted both IPs to binary, and found the most significant 0, and then 0'ed out all of the bits below that. Then I converted back to decimal.
(I simplified the examples, because explaining subnets or sorting is beyond the scope of this post.)
In short, I rarely do basic math, but some of the more advanced stuff is critical. I would suggest grabbing a copy of a programming language, and attempting to modify a simple program to do something else, to see if you have what it takes to be a programmer.
I'd suggest Perl, but that's my opinion, and opinions about languages vary greatly. Perl is one of the more natural languages, and may be more forgiving for you. Then again, it may cause more problems because you're not explicit enough in telling it what you want, in which case try Python.
Good luck. -
MoreThis is a great idea, but there's not a great deal on there. I've been making up CDs full of free and open source Windows software for a couple of years now, which (along with Knoppix and Toms) prove to be extremely useful. Here's just some of what's on there (note that some of the links don't actually point to the Windows version of that software; you might need to dig around a bit):
- Abiword - Word processor, supports
.doc, .rtf, GPL. - Open Office - Whole Office suite, including a database frontend and BASIC macro language.
- Perl - Scripting language
- Python - Scripting language
- Cygwin - UNIX emulator. Can create Windows programs, reliant on a cygwin1.dll.
- MinGW - Port of some of the UNIX utilities (BASH, gcc, vi...) to Windows.
- djgpp - UNIX emulator for DOS.
- Mozilla, Firefox, Thunderbird - Web browser, e-mail client, IRC client, lots more.
- Filezilla - FTP client.
- xchat - IRC client.
- putty, pscp, psftp and others - Telnet/SSH clients.
- Gaim - Client for IRC/Yahoo/MSN/ICQ/AIM and more.
- gzip - Compression (usually better than
.zip). - tar - Extracts/Makes tar archives.
- bzip2 - Totally ace compression (usually better than gzip).
- Info-ZIP - Support for
.zip. Good free substitute for Winzip. - 7-zip - Support for multiple compression formats.
- frhed - Hex editor
- Ext2fs - Several programs for doing Ext2 under Windows.
- Antiword - Converts documents out of the proprietary
.doc format. - MySQL - RDBMS.
- Apache - Web/Proxy server
- sendmail - Mail server
- squid - Proxy server
- freeamp - Audio player
- winlame - MP3 encoder
- cd-ex - MP3/OGG encoder?
- gimp - Very detailed graphics program.
- imagemagick - Graphic manipulation. Provides the 'convert' utility under UNIX.
- freeciv - Civilisation clone.
- gnuplot - Plotting package.
- TightVNC - A fork of VNC, with enhancements.
- RealVNC - The original VNC.
- rdesktop - Access Windows Terminal Services and Remote Desktops.
- Nmap - Well known port scanner.
- John the Ripper - Password cracker. Does NT and MD5.
- Abiword - Word processor, supports
-
What algorithm are they going to useHopefully they'll use something modern like ARC that tries to keep in cache stuff that have been read at least twice, NOT LRU !!
AIX uses LRU today, so when you do a backup, the system tries to keep all filesystems in cache (well that what was read last !!), and will happily swap your apps out to disk in order to do so (with default tuning parameter).
I fondly remember the days when I was running Linux with no swap, none whatsoever...
-
Re:6-line perl script here
Escape while you can - knowledge of Perl will only lead to madness.
There are superior alternatives - and you should be able to pick up the basics in 20 minutes if you follow the tutorials. -
Uninformed article submission.
"Linux programming is the C Programming Language. Elaborating a little, Linux programming is C, with the GLIBC library and the POSIX standard API."
For Linux kernel programming the logical choice might be C, but the article makes it sound like that's the only way to program on Linux.
If you're a commercial programmer, chances are that C++ is more useful to you (shock, horror - C++ is not C). And I would recommend Python for higher level programming (and also for beginners to the programming world). -
Re:Obsession with C-like syntax
like what?
I'm fond of Python, which sports a very clean, readable syntax without giving up flexibility or power. Python is good if you don't want to give up a traditional class/method, loop/imperative style of programming.
There's also Smalltalk, which requires getting one's head around a different model of program design, but can yield very elegant and effective solutions. Squeak is a good place to start for those curious about Smalltalk.
Those are just a couple of suggestions. There are lots more out there. And of course, if you're happy with Java or C#, well, who am I to stand in the way of your joy?
Bander -
Perl6 is a mistakeI've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.
One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespace thank you very much).
The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.
Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.
On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?
I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. To put it bluntly, Perl scripts will still look less beautiful than our friend Mr Goatse. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.
Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying. Larry is buggering it up the ass without lubricants, just like Shoeboy is doing to Larry's daughter.
-
Re:Why Python?
Try reading ESR's Why Python?, also check out the Quotes on Python from python.org
:)
It's a beautiful language, I'm sorry I can't code in it more... -
Integrating the two approaches
Here is a presentation, with PDF article, about integrating the two approaches, straight from recent PyCon:
-
Re:Why Python?
First off, I had mod points and I feel bad about not modding you up, and you don't deserve a 0:offtopic score.But I though a responce would be better.
Can someone help me understand why I would want to use Python as opposed to Java?
Python is not just about brevity, but I think you underestimate writing less lines of code. Take the fact that if you are writing twice as much code, you're probably writing twice as many bugs. Also a consise 50K LOC program is much easier to get around in than a 200K program.
But anyway, Python is an interpreted, interactive, object-oriented programming language., where as Java is only the last of those three. Python also has dynamic documentation, meaning that the documentation string can be inspected at run-time, without the need to maintain a separate doc tree, ie Javadoc.
Classes are dynamic ie. you can change their behavior at runtime. All python objects can be marshalled or serialized, while in Java you have to define the interface, and account for anything that you use that can't be serialized.
There are also thing which I am indifferent about like tabbed blocks, and some things which I don't like, like not having enough compile time type checking. IMHO you should always define the type of a function parameter, it makes learning the API faster.
In general, Python is great for script-strength stuff, ie. in situations where you would use perl. I can see it getting unwieldly as it got bigger but it generally scales much better then perl. Java tends to be too complex and too restrictive. In short there are many situations where you would choose one over the other. -
Re:Python's dirty little secret
Despite all of Guido Van Sustren's claims to the contrary, Python's garbage collector just doesn't work correctly, allowing the programmer to create a circular reference which never gets resolved. This is a critical impediment to writing mission critical applications in Python, as they will eventually run out of memory and fail.
Neither of those references point out he weakref module that allows you to work nicely with circular references.
Python's memory issues need to be fixed before the language can break out of its niche.
Yep, it's a niche language. Crawl back under your bridge. -
Re:Python's dirty little secret
Despite all of Guido Van Sustren's claims to the contrary, Python's garbage collector just doesn't work correctly, allowing the programmer to create a circular reference which never gets resolved. This is a critical impediment to writing mission critical applications in Python, as they will eventually run out of memory and fail.
Neither of those references point out he weakref module that allows you to work nicely with circular references.
Python's memory issues need to be fixed before the language can break out of its niche.
Yep, it's a niche language. Crawl back under your bridge. -
Re:Python's dirty little secret
"As for your claims about the GC, I was under the impression that current versions of Python have a hybrid GC that cleans up circ-refs."
According to this you are correct.
BUT.. please note it also says "You can run gc.collect() to force a collection, but there are pathological cases where objects will never be collected."
It also mentions the use of weakrefs. :) -
Re:Python's dirty little secret
Despite all of Guido Van Sustren's claims to the contrary, Python's garbage collector just doesn't work correctly, allowing the programmer to create a circular reference which never gets resolved.
Circular references are what weak references are meant to handle. But it'd be nice if the garbage collector would handle those cases automatically.
-
Python+WebWare+Cheetah vs. .NET and Java?i've been looking around for awhile now for a replacement for java servlets and velocity templates. i think i may have found it:
python replaces java
webware replaces servlets
cheetah replaces velocity
i've just started using python, haven't even cracked open webware or cheetah yet - but conceptually, at least, these seem quite similar to their counterparts.
i suspect the java-based stuff is faster, scales a lot better, has more libraries, and is more mature - but the P+W+C might grow to fill that void, using completely free software.
has anyone used both of these sets of technology? what are your opinions?
-
Another MS "settlement"?
This whole thing reminded me of the MS's settlement with AOL-TW, that involved AOL killing Mozilla development, I wonder how long will Sun keep supporting OpenOffice.org after this... fortunately for anyone that uses OO.o(not me), OO.o is Open Source so in a way the cat is out of the bag, still, IIRC sun provided most of the development resources, while Mozilla the dev team was under 50 people IIRC(more like 20 in reality), I think I heard sun has 300 people working on OO.o...
Does anyone here see a pattern? Apple, Corel, AOL, Sun, ... (I'm sure there have been a few more) What you do when you have an (practically) infinite pile of cash?
pay your competition to kill any product that might threatens your monopoly.
As for Java, IBM better start to think what they are going to replace it with...
I'm glad I dumped Java completely and now I work mostly with Python, not only it's a much nicer language, I also don't have to worry about Sun politics anymore.
If you use java you are still in time to switch to something better, more portable, truly open, and that "sucks less", something like Python... or like Inferno/Limbo ;)
[Inferno is now really Free, you can download it from Vitanuova, and as an extra you will get the greatest C compilers ever created, Ken God Thompson C Plan 9 compilers! don't worry about the "details" form, you can just click the "proceed to download" button]
Best wishes
uriel -
Python ResourcesPython is an ideal language for hacking in - I completely agree with your points about it being easy to pick up - and easy to pick up your own code again after a month or two away from it. Here's a handy list that I have prepared for whenever somebody mentions Python in a context like this one:
Python Resources
This is a list of what I consider to be the most useful Python packages. They give Python the ability to tackle almost any project.
Core packages- Python - Get the Python interpreter, base libraries from here. The default install includes the IDLE editor.
- Win32All - Windows extensions package that includes the excellent Pythonwin editor.
- wxPython - Wrapper to the cross-platform wxWindows window manager library. It's a better windowing system than the TCL/TK library that is the default Python install.
- Boa Constructor - GUI builder that uses the wxWindows library.
- Psyco - x86 runtime compiler. Transparently improves the performance of most Python code - for performance-critical apps, it's often a much better solution than a C rewrite.
- Py2Exe - Builds Python scripts into Windows executables. Perfect for distributing programs to systems that do not have Python installed. Use with Psyco for the best effect.
- PyOpenGL - Use OpenGL from within Python
- Python Image Library (PIL) - Package for easy image loading and manipulation
- PostGreSQL - Full-function SQL database. More complete and advanced than MySQL.
- PyGreSQL - Python bindings for the PostGreSQL database.
Python includes a full suite of functionality to build internet applications in the core install, but the following are frameworks for building and deploying web applications. -
Python will get you back on track fast
If there is ever a language that you can get up and running with quickly, it is Python. Runs on any platform, has a great library, and what is more, if you have to take a month off from your code, you can still figure out what you were doing.
-
Re:Not 'instrustrial strength'
Cool. Wish they'd document the command line options somewhere under http://www.python.org/doc/current/.
-
Re:CSV, etc?
Better yet would be Python's pickle serialization library, which stores anything from strings to classes, all in printable ASCII... ie. a freakin' cookie.
-
Re:Not 'instrustrial strength'
Are you sure? The Python 2.3.3 manual simply says leading tabs are expanded to spaces mod 8. If your editor disagrees with Python about the size of a tab, you could easily be misled about whether two lines are indented the same in files many people have worked on.
-
If you like the films
try the language!
-
Re:How can we fracture it?Java will never succeed with Sun holding an iron grip over it. IBM, currently Java's biggest supporter outside Sun, has already stated so. The Linux vendors have said so. The simple fact is that computer languages need to be vendor neutral to be a long running, wide ranging success.
Sun wants control. I say let them have control over their crappy language. May they keep it all to themselves, while we go on using something else. Something better. No, not
.NET. That is more of the same. The OSS community has proved they are able to create better languages and development environments than Microsoft or Sun. We should instead make our own community driven language neutral VM, for example Parrot, establish our own standard high-level language, for example Python.Who needs a half-assed effort, riddled with vendor lock-in?
-
Re:The silver bullet already exists
The silver bullet of programming already exists. Link.
For a minute there I thought you meant this silver bullet
I know that I am a much better programmer after a couple of "silver bullets". -
The silver bullet already exists
The silver bullet of programming already exists. Link.
-
Python already has thathere you go autocompletion in the editor is availible in vim here
-
Re:Let Me Get This Straight
I was under the impression that python had an optional garbage collector, enabled by default.
Also, I'm not sure what do you mean by bigger footprint when you refer to a language. GC interpreters/VMs may have a bigger footprint, but at the same time the footprint of the running software is smaller than reference counting because of the lack of reference counters. -
Re:Let Me Get This Straight
such as JDBC drivers, XML parsers, SOAP tools and 3rd party components
Semi-check, built-in, check, and check (including a lot of real winners, particularly including multiple cross-platform GUIs).
(The semi-check is because I'm not 100% certain the python modules match the JDBC completely.)
The only advantage Java offers is when it has an actual library that you can't get in Python (or likely anywhere else); capability for capability the languages and libraries are pretty close to the same. I mean, we have "Web Application Servers" for Python (like Zope), but maybe you absolutely need some Java thing for some other reason. There's no one language that meets all needs. But there's no reason Python can't be used in very large scale projects successfully, as evidenced by the fact that it has been so used.
Personally, I'd much rather use Python for the larger scale projects since for a variety of reasons I think it scales better then Java; Java projects IMHO survive because they get a lot more resources thrown at them, not because the language does very much to hold large projects together. But that's just my opinion.
(Oh, and Jython, though I know it's been mentioned elsewhere.) -
Re:Let Me Get This Straight
such as JDBC drivers, XML parsers, SOAP tools and 3rd party components
Semi-check, built-in, check, and check (including a lot of real winners, particularly including multiple cross-platform GUIs).
(The semi-check is because I'm not 100% certain the python modules match the JDBC completely.)
The only advantage Java offers is when it has an actual library that you can't get in Python (or likely anywhere else); capability for capability the languages and libraries are pretty close to the same. I mean, we have "Web Application Servers" for Python (like Zope), but maybe you absolutely need some Java thing for some other reason. There's no one language that meets all needs. But there's no reason Python can't be used in very large scale projects successfully, as evidenced by the fact that it has been so used.
Personally, I'd much rather use Python for the larger scale projects since for a variety of reasons I think it scales better then Java; Java projects IMHO survive because they get a lot more resources thrown at them, not because the language does very much to hold large projects together. But that's just my opinion.
(Oh, and Jython, though I know it's been mentioned elsewhere.) -
Python already has thathere you go autocompletion in the editor is availible in vim here
-
Re:Python and data typesYou're already proposing several solutions, as others are as well -- SDL (probably most accessible through PyGame), PIL, Numeric, some extensions available through SciPy, and eventually moving into things like PyTables or even lower-level functionality like array or ctypes, there's also the possibility of coding in C or another compiled language, or using Pyrex. for some easy-Python-integration goodness, or Psyco which can do some pretty magic stuff in select situations.
No, it's not like MATLAB -- Python is a general-purpose language. If you want MATLAB, then you're looking for a more specialized environment, like SciPy (maybe using iPython to provide a nice interactive environment). As a MATLAB replacement, Python is probably a work in progress.
If you want homogeneous collections with fast transformations, you must do it with somewhat opaque containers like Numeric, where anything that runs inside the inner loops of transformations is written in a very fast language. (Oh, I just remembered Weave) This is true in Lisp as well, though Lisp has also had compiled forms which are pretty quick.
Anyway, lots of options. Stop complaining and enjoy what you got!
So, is Java really better? I honestly don't know the scientific or image processing domain, so I don't know where Java's at there.
-
ActiveState screwed up
Just because ActiveState screwed up doesn't mean that the CLR runtime is bad. In fact, recent work on Python implementations on top of the CLR beats both Jython and even the native C-based implementation.
-
Re:New File Selector - WOO HOO
Certainly none that matches the convenience of the Filer windows in RISC OS where you would double-click (or drag) a file to open it, and drag from the application to the Filer to save
That's subjective... I could claim that needing to drag an icon from a text editor to a whole other window (which I'd have to find and make visible first) is painfully slow compared to :wresult3.txt, and in many contexts I'd be right.
That points to one big advantage of the dialog box approach: keyboard compatibility. Desktop environments which offer DnD should provide some (optional) way to perform equivalent actions from the keyboard, but I'm not aware of any having done so.
Digressing down that topic:
There have been some small steps made towards keyboard-controlled DnD, but I haven't seen any adequate yet. Of course, some systems let you push a button to steer the mouse from the keypad, but that's too awkward to consider. Some file managers include an abuse of the clipboard metaphor (like a Copy button which makes a "shallow copy", instead of a "deep" one like every other Copy command besides Excel) to provide features that could be better solved by enabling DnD via keyboard. There are assorted taskbar-applets which provide a "shelf" to set down an icon in mid-drag; enhancing one of those to be controllable by keyboard would be the most direct implementation of a solution. -
Re:These are a few insecure programs that won't wo
Helvick,
I am trying to find out if SP2 breaks. interpeters like Java and Python. They generate object code on the fly.
Does Java work in Firefox?
Does Python work?
You can downlog the python interpeter from this site. -
Re:The best thing about PerlIf you like POD, then Python's doctest module will blow your mind. Basically, you include example code snippets in your documentation to demonstrate how the code is supposed to work. Then, the doctest module finds all of those snippets, evaluates them, compares them to your example results, and reports on any differences.
So, not only can you easily document your code, but you can trivially insert automated test cases for later verification. Good stuff, that.
PS: I'm at home, sick with a fever, and jacked up on cold medicine. Proofreading is beyond my ability today. Please take any grammar mistakes with a grain of salt.
:) -
Re:what are the licensing terms?Python + Boa-Constructor ~= Delphi. As VB programers start to realize what they can do, and still be in complete control and participate in the language evolution, yes, I think Python could replace VB within 10 years.
Also, don't forget that Guido got a DARPA acceptance and funding for Computer Programming for Everyone. Kids may be learning Python in elementary school soon.
-
Re:what are the licensing terms?
Your comment gives the mistaken impression that OSS is somehow destined to always be behind proprietary software, as far as innovation and technical superiority is concerned. Microsoft and SCO love that notion, but unfortunately for them, it's not true. OSS is overtaking proprietary software in many areas, and it's reasonable to expect this trend to continue.
Here are just some of many examples of innovative, open-source software:
Python A very clean, versatile language. Will probably replace VB for custom RAD in the next decade. KNOPPIX A very well-featured bootable OS. Mozilla Firefox There are really too many improvements to list here. Vorbis Cutting-edge audio codec Freenet Decentralized global data storage system. WikiWikiWeb LaTeX Widely-used document preparation system. Spawned from TeX, an open-source typesetting system. Popular among mathematicians any cryptologists. A completely new approach to global collaborative development. Eventually led to Wikipedia. -
Okay, use Python as an example
Python is copylefted and is somewhat more comparable to Java than C. It has is own VM and is bytecompiled. It consists of not only a language, but also a rather rich library layer. And it is mostly "write once, run everywhere"; unless you specifically create/use extensions which are platform-bound. But the vast majority of Python programs are extremely portable.
Any Python has not suffered from any forking issues! Nor has Microsoft corrupted it via it's usual extend/embrace strategy. But Python is really *free*, unlike Java.
-
No optimizer in MSVC Standard Edition
$1000 for one seat? What version are you getting and where are you buying it?
Microsoft Visual C++ Professional Edition, which seems to be the cheapest version with an optimizer in the Microsoft price list.
You can get Visual C++, which is all you need to compile most open source stuff, for $100 so
The version of MSVC available to the general public "for $100 or so" is Microsoft Visual C++ Standard Edition, which contains no optimizer. I've read that the performance of its generated code is so poor that one might as well use an interpreted language instead of MSVC Standard for new apps or run the UNIX version of an existing app in the Cygwin API translation layer rather than try to compile the Windows version in MSVC Standard.
-
Re:astyle, indent, etc. with subversion
Anyone know if there is a way to use subversion for automatic canonization of code style?
Yeah, host a python repository with it.
-
Re:Here's my Electronic Enigma MachinePython, infinitely useful "out of the box", has come bundled with a module called "rotor" which is basically an enigma-like scrambler. You can add as many rotors as you like to your digital enigma-like machine.
Sadly this module has been marked for deprecation in python 2.3, though it is still there. I found the module very useful for some things --- a simple, light weight encryption can be a handy thing. Everyone knows that it is weak encryption these days though... but still useful, in my opinion.
-
Re:Here's my Electronic Enigma MachinePython, infinitely useful "out of the box", has come bundled with a module called "rotor" which is basically an enigma-like scrambler. You can add as many rotors as you like to your digital enigma-like machine.
Sadly this module has been marked for deprecation in python 2.3, though it is still there. I found the module very useful for some things --- a simple, light weight encryption can be a handy thing. Everyone knows that it is weak encryption these days though... but still useful, in my opinion.
-
Python implementation of rotor encryptionDocumented here.
It's in the standard library and supports an arbitraary number of rotors. I don't know if it's strictly compatible with the original Enigma, though.
-
Perl6 is a mistakeI've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.
One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespace thank you very much).
The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.
Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.
On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?
I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. To put it bluntly, Perl scripts will still look less beautiful than our friend Mr Goat.cx. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.
Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying. Larry is buggering it up the ass without lubricants, just like Shoeboy is doing to Larry's daughter.
-
Python Resources.This is a list of what I consider to be the most useful Python packages. They give Python the ability to tackle almost any project.
- Python - Get the Python interpreter, base libraries from here. The default install includes the IDLE editor.
- Win32All - Windows extensions package that includes the excellent Pythonwin editor.
- wxPython - Wrapper to the cross-platform wxWindows window manager library. It's a better windowing system than the TCL/TK library that is the default Python install.
- Boa Constructor - GUI builder that uses the wxWindows library.
- Psyco - x86 runtime compiler. Transparently improves the performance of most Python code - for performance-critical apps, it's often a much better solution than a C rewrite.
- Py2Exe - Builds Python scripts into Windows executables. Perfect for distributing programs to systems that do not have Python installed. Use with Psyco for the best effect.
- PyOpenGL - Use OpenGL from within Python
- Python Image Library (PIL) - Package for easy image loading and manipulation
- Plone - Web applications, built on top of the Zope framework.
Abandon Perl! Python is the future! -
Python
The Python programming language and all of its standard library modules make extensive use of unit tests and TDD.
-
Re:Alternative reading?
Ever heard of python? I am currently reading "learning Python" by Lutz & Ascher (O'Reilly). The language is very easy to learn, yet very powerful too...
The website has a load of good tutorials, too.