Python 2.0 Released
atallah writes: "It would appear that the long awaited Python 2.0 was finally released today. The front page of the Web site has the announcement." According to that announcement, Python 2.0 will receive minor-version updates around every 6 months, even as work begins on the shoot-for-the-moon Python 3000. For the curious, here's the list of what's new in 2.0; the list includes "full XML support and several forms of new syntax," as well as the BeOpen label.
Ugh. What good does an endorsement do? I agree that we should choose based on technical merit. Who's this for, then? The suits? They're probably more impressed by which businesses use Perl (a LOT more and a lot more famous not matter how you slice it). Don't get me wrong: Python is my favorite language. It's good enough for me. I could care less if it's good enough for ESR.
I hate ESR. Ever since his "I'm rich, you're not" email to the world, I've written him off as a classless pig. Odd how he never talks about his options anymore now that they're not worth a bag of hot piss.
Is this new release compatible with a certain, popular free-software license?
The Python CGI module is pretty simple, but easy to use. Unfortunately, the HTMLgen packages isn't included in the standard distribution, so you'll have to either write your own HTML (not much harder) or *gasp* download the module.
If you're just mashing text and doing database lookups you'll have a slightly harder time than in Perl, since Perl's DBI is better (Python's catching up, though) and RE's are part of the language (not that I think that's a good idea in general, but if you're messing with text it's great). You can still use the exact same REs from Perl in Python, but you'll have to type a little bit more!
Python's beauty really shows when you've got big projects, which most CGI scripts aren't. But it's still pretty good.
Big, long, scaly deal.
Wow... someone actually checked out dtmc. :)
However, in doing so, they found that I gave the wrong link. See sourceforge.net/projects/dtmc; there are no releases, but the code is in CVS. The build process needs a major overhaul, but you should be able to tweak it into operation.
So when is Python 2.0 going into Woody? Anyone know? Right now all we have is 1.5.2
--
A buddhist walks up to a hot dog stand and says ``Make me one with everything.''
If you are happy with doing CGI at a raw sort of level -- you get a dictionary (hash-table) of posted variable and print to stdout -- then there's no reason you can't do it in Python.
If you want to see a moderate-sized CGI program, you can look at ComfyEdit, which I made. I think it's reasonably accessibly while still having some novelty. Well, no, I take that back -- I just looked at it, and it's really rather monolithic.
--
http://slashdot.org/articles/00/02/16/1729227.shtm l
Some very valid and interesting points brought up about both languages. I know this story is about python and not perl, but whenever anybody discusses one the other is bound to come up in conversation.
Opps.. thinks should be things.
This is a totally unnecessary post. I'm checking the link in my signature to make sure that it points to my new server for DeCSS. Woo-hoo.
So python doesn't allow operator overloading? if it did you coulda done it yourself. and that's no fun not having
operator overloading. it's always good to make a class whose + operator subtracts and whose - operator adds. or
something...
What are you talking about? Python has had operator overloading for as long as I have used it (which is only since version 1.5
Look and Windows, it has a lot of endorsements but that does not mean that it is the best...
Exactly. Endorsements provide an excuse not to think. For example, consider the recent posting on Slashdot today about techies endorsing Gore...
Perl6 times infinity = infinity = Visual Basic times infinity.
;)
I'd rather use Perl6 than something that resembles Visual Basic.
//Humming
I'm too stupid to preview.
As I don't see any mention in that post about a change in the license for the final release, I suspect it's still GPL incompatible. :\
I wonder what Debian will do about this...
Either stick to 1.5 or remove all GPL apps that don't update their license in order to use 2.0.
ESR may be a good politician, but after reading The New Hackers Dictionary, I'm convinced that the world would be a better place if he was court ordered to stay at least 50 feet away from any source code or technical issues. At least he should lose the right to pretend he is speaking for others than himself.
-segfault
I thought I read that Guido van Rossum never wanted Python to be associated with snakes. Based on the Python 2.0 website, I guess he lost that battle...
---- Politics: Kissing ass and pointing blames.
But did you read the artcile to see why it was endorsed? Did you? If you did, you will not have posted the above. There is nothing wrong with endorsement if it is truthful, unlike windows world where FUD is the key.
------ Curiosity killed the cat. {satisfaction brought it back | it didn't die ignorant | lack of it is killing mankind
I'm an avid perl user. It's always my first choice for doing any fairly small task (less than a week) and absolutely anything that does text manipulation or unix scripting.
That said, I think perl would be a horrible choice for a first programming language. A little structure from a language is actually a big benefit for a new programmer. It helps to prevent yourself from shooting yourself in the foot too badly.
Also, the lessons you learn in perl may not translate well when you learn another, more traditional language. Data typing is an important concept of of programming in most languages, but perl's handling of data types would be confusing for a beginner.
I've never used python, but it sounds like a decent language. The best language for new programmers I've used is java. It's very programmer-friendly, compared to C, C++, or perl.
Cheers!
-Bruce
Maybe you should take a look yourself instead of just linking to pages you little karma slut :P
It's not a rumor. It's a fact.
// C
- Kill: Posts about Linux Journal's naked men
- Kill: Posts flaming about the how much better perl is
- Kill: Posts about how required indentation sucks
Is there any way to better filter the slashdot comments? Maybe something could be done using Mozilla's new Formzilla?*sighs*
I miss usenet.
--
This message brought to you by Colin Davis
Colin Davis
--
I do all my website programming in python. It is great to see the += and related operators now in the syntax. I hope, though, that the developers will limit the new trend to introduce notation that could be seen as 'obfuscated' if used in the wrong hands. I really liked the original philosophy of having the 'anti-perl' syntax. Great work guys! (Although I wish there was support for C style {bracketing} for statements)
-Moondog
This is just my opinion, but to me comparing perl and python as far as reading other peoples code is like comparing GWBASIC to Java. Pythons programmers also seem to have a programming philosophy that is more in tune with the way that I think then perl.
I of course am just beginning to learn Python, so after I become more proficient in it and perl I may decide that perl is better for some reason.
All of this doesn't matter very much in the end since I mostly program in C, C++, and Java.
Environmentalists are their own worst enemy. ~tricklenews.com
Oh well I'm just starting to learn python but I already like it better then perl.
Environmentalists are their own worst enemy. ~tricklenews.com
What task did you need to go at in a roundabout way? The only one that comes to mind is avoiding circular references, and that one is pretty easy to manage.
Weapons of Mass Analysis
*laugh* p3k is a blue sky python with type inference, and other functionality. Its a moving target, so to speak, so it doesn't have a specific version number..
Yet.
Weapons of Mass Analysis
Well, one of the primary arguments for augmented assignment was actually related to the p3k project, and optimization. The reasoning goes, that it is faster to perform self.attribute += 1 than it is to perform self.attribute = self.attribute + 1 because there is one less attribute lookup.
And while this may appear trivial, it becomes somewhat more important once you realize that Metaobject programming in Python often involves overriding the methods for getting and setting attributes with new methods. Every get/set counts.
I don't think we're about to see a flood of perl-like syntax sugar rotting the teeth out of our Python just yet. =)
Weapons of Mass Analysis
I've been playing around with it for a couple of weeks and it works well. I really like the wxWindows bindings for python 2.0 (I also love the number of gui widget toolkits you can get - I was just looking at the fast, light toolkit the other day - it also has python bindings). The great thing about scripting languages and open source is that there's no need to ship binaries and source, the executable code and the source are one and the same thing. Whereas in the proprietary software world this would be a problem (you need to actually take steps to "protect" your code), in the open-source world this is an advantage.
I've been avoiding Python up to this point, but I think it's inevietable that I learn it. I haven't avoided it for any specific reason, merely because I just don't have the time to devote to it.
I've been reading about how it's gaining ground, but I've yet to talk with people that use it on a regular basis. Anyone care to share insight on their programming experiences with it? Specifically in use as CGI applications?
"We" (whoever that is) don't need endorsements, we need quality software. Your comment is as informative as the assembly instructions for my bookshelf...written in Chinese.
--------
-------
"Every artist is a cannibal, every poet is a thief."
I agree that Python is a good beginner's language, and probably better than Scheme for this purpose. But Python's lambda is quite anemic, a pale shadow of the construct provided by more pure functional languages.
I dont want to start a flame war or anythig stupid like that. I am trying to teach myself how to program and I am thinking of going with either python or perl as my first language. I am interested in an honest account of the benefits of python over perl and perl over python and if either would make a good first language. I am serious about this so please please please dont use it as an excuse to troll and flame. Advance thanks go to all who post.
Anyone knows anything more about the problems with GPL compatibility? Last time this was submitted to /. (yeah, it seems to repeat itself much these days), there was a problem with the license stating that you had to interpret it by Virginia law, which clashes with GPL's claim that you cannot put further restrictions on a program you link with (for Python extensions). Annoying problem, since otherwise the license was very pleasant.
Hey, I found that book extremely funny (although I prefer the online version: jargon.txt). What was it you didn't like?
I can see calling Java or Pascal or even C++ too structured, but Python? It's an extremely flexible language.
Which is really unfortunate. The two languages are extremely different. They are similar in that they are both very dynamic and both begin with the letter 'P' -- that's about it.
Beware of world domination now that Python 2.0 is on the loose. Python4Ever
I use Visual SlickEdit for my Python development. It has a lexer for Python, but by default there are no file extension mappings to the Python lexer. Easy enough -- I just associate ".py" extension to the Python lexer, and voila - nice color-coded syntax support! BTW, I also use Visual SlickEdit for C/C++, Java, HTML, bat files.
Anyway, great to see the release - I've been using 2.0rc1 for a while now. I want my Shrubbery 2.0, Nih!
--
Escher was the first MC and Giger invented the HR department.
hahaha hah ah aha ha! ... I don't get it.
I think it's a neverending debate because the good question is not "Which one is better as a first language?" The question you should ask yourself is "Which one is better for me?"
/tu t/tut.html u rse.html
I found Python to be better suited for me, and of course I'm trying to convert everyone to Python. But I know there are (lots of) people who prefer Perl.
So, here is my unofficial "Choose between Perl and Pyhton in 2 days" guide:
Day 1
Download and install
Python at http://www.python.org/download/ http://www.perl.com/pub/lang uag e/info/software.html
Download/Browse/Print (whatever suits you) some tutorials
Python at http://www.python.org/doc/current
Perl at http://ww w.c clabs.missouri.edu/things/instruction/perl/perlco
Rest of the 2 days:
Follow the tutorials and try to write some very short programs of your own.
Third day:
Go back to work with sore, red eyes.
Later: Learn them both, and C too!
It means I no longer have to be confused in Java. Now I can be confused in my favorite language. I think the big deal is DTD validation is now available.
-Nuke the moon
http://www.modpython.org/
For everyone who understood the headline: Go colonize Mars instead! (BTW, it's actually a different link from last time.)
Human extinction is on the way.
I am using PHP and Id like to know the Pros and Cons of using Python and Perl (concerned to PHP) The only information I get while reading through those comments are comparisons about Perl and Python (and stuff like "Python is better than Perl")
I am wondering if PHP isnt in competition ? I have a good feeling using PHP, but Im not really in Python/Perl so Id like to get a small overview about those languages.
Evrything is relative.
C and Pascal, surely.
Yah, but that's intentionally tackling the steepest part of the learning curve first. Why not start with something with a smoother slope, learn most of the base concepts there (general algorithmic design and the like) and move to C once all the "easy" stuff is out of the way rather than trying to take it all on at once?
Learning C is a much less daunting task if you already have some programming experince under your belt. While I learned C before Python (Perl is absolutely not a beginners' language, far worse for that than C), I'd advize those after me to do it the other way 'round.
I thought Linux and Open Source was about producing the best product...Not which product has the most endorsements. Look and Windows, it has a lot of endorsements but that does not mean that it is the best...
I think what it comes down to is this: Your first language should be as easy to use as possible, and as easy to get results with as possible. It's more important that someone gets encouraged and continues programming, rather than giving up than it is to ensure that they've learned good programming habits. That's why BASIC was such a good language to learn with. (I learnt on BBC Basic) Of course the nice thing about Python is that I doubt it would encourage many bad habits
And anyway, you can un-learn bad habits.
Once you are happy using Python, have a go at C/C++ - it is the de facto standard in computing languages, and you'll get to learn all about the wonderful world of memory management...
cheers,
Tim
What is meant by "full XML support"? I ¥briefly, admittedly looked over the page, but I didn't see it explained©
Wouldn't that be like saying "Full Ascii support"?
How does a programing language support a document format?
Does it have some sort of built in parser?
¥Not trolling, just curious
--
This message brought to you by Colin Davis
Colin Davis
How should I know. Probably yes, if you plan to do any Python programming. Pickling objects is what is called "serialization": you can store any object hierarchy to disk/database/whereever and get this object hierarchy back later. This works across the network and across platforms, of course :-)
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
Will I retire or break 10K?
In a related announcement today, PC generation guru Philippe Kahn announced that his new company, "Reptilez", will be offering "Turbo Python" for all Windows development environments in the 1st quarter of 2001.
..., uh, well, umm, ..... When they get his email up and running we'll provide the address!
For further information please direct your inquiries to
Do I really want to know what this function does?
-- You see, there would be these conclusions that you could jump to
So we get to see all new episodes! Great!
I'm not dead yet!
(Sorry, couldn't resist....)
Then it's good enough for me. Does the perl commnity have any plans to get a ringing endorsement from such a public opensource figure? I mean, besides Larry Wall, of course. We geeks may make these decisions on their technical merit, but it really helps the suits if a celebrity pitches it to them.
-- Anne Marie
Which editor has good support for editing Python source code?
On Unix, the first choice is Emacs/XEmacs. There's an elaborate mode for editing Python code, which is available from the Python source distribution (Misc/python-mode.el). It's also bundled with XEmacs (we're still working on legal details to make it possible to bundle it with FSF Emacs). And it has its own web page:
http://www.python.org/emacs/python-mode/index.html
There are many other choices, for Unix, Windows or Macintosh. Richard Jones compiled a table from postings on the Python newsgroup:
http://www.bofh.asn.au/~richard/editors.html See also FAQ question 7.10 for some more Mac and Win options.
Hope this helps. Like I said above I'm just beginning to learn python so my knowledge is somewhat limited. I just like what I've seen so far.
Environmentalists are their own worst enemy. ~tricklenews.com
"I'm sorry", said God, "but the release schedule for Human is to be set back again." God went on to specify that Human 1.0.1 is having trouble making it to beta due to a hairy bug in the evolution code in Kansas.
MyopicProwls
MyopicProwls
My homepage
Why would you use a lame language like Python or Perl
Every one knows that the best language is Visual Ba
This post has performed an Illegal Operation and will be shutdown.
The changes seem to be an incremental evolution of the language, not a groundbreaking new language. But if you are a language / tools junkie like me, you owe it to yourself to take a look, even if you're turned off by the rumors of mandated indenting.
Bleh!
Just wanted to throw out some thoughts on why I steered the project I'm currently working on towards Python. My background is mostly in the MS suite of things. I also know Java, Python, Smalltalk, LISP, C, C++, and I've tinkered with Perl, REBOL, Prolog, etc. so I'm no MS bigot; that's just the majority of my experience.
.NET initiative may push VB into the cross-platform arena soon, it won't be soon enough for me.
.NET world, and throw in Zope for good measure.
First of all, why did we choose Python? The project is basically fat client, and could have been done with almost any development environment.
In our case, Java and VB were the other primary contenders. We need a rapidly developed application that is cross-platform. The customer doesn't have much money at this point, and therefore not much time either. Therefore Java is out. That seems counter-intuitive right? Java is supposed to save a lot of time after all. However, that's only true when you compare Java development time to C or C++ development time. Compare Java's development time to VB or Python's, and it's a completely different story. Java just didn't seem to work at a high enough level of abstraction to get the job done.
So, why didn't we use VB? That's simple: it's developed for, and stays on, Windows. And that's it. Yes there are products that will let you translate VB to Java. There are some cross-platform Basic products out there. Have you used them though? They don't get the job done very well. And they normally leave it to you to figure out where a translation/cross-compile goes wrong. All in all, it just doesn't have a professional feel to it. Also, while the
Now, I suppose we could have used Perl, but frankly I fear Perl. Why? Because of the very flexibility it asserts as an advantage. Yes, I can write the solution in pretty much the way I think. Given the fact that I have yet to find two people who think about a problem in the same way though, that's a maintenance problem in what may become a large project.
Once I selected Python on a preliminary basis, I had to make sure it would actually work. I developed GUIs for it with no problem. We did an XML proof. I did proofs on its object capabilities. I looked at sites and applications developed in Python. Could it handle the (relatively tiny) needs of my project? You bet it can. It can do all of that and more.
Anyone who wants a relatively impressive sample of what Python can do should take a look at http://wildsau.idv.uni-linz.ac.at/mfx/pysol/. It's a huge (free!) solitaire game with all sorts of options and games. I haven't seen anything else like it come from the other scripting languages (not picking on any one language here though), except VB, and that is not on the list. Pile that game on top of the fact that Python gets used for server-side applications, has two companies actively working on its development (BeOpen and ActiveState), can be used in the JVM (JPython), will be usable in the MS
Python is a VERY strong VB replacement contender.
Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!