Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Python Moving into the Enterprise

timothy posted more than 9 years ago | from the slither dept.

Programming 818

Qa1 writes "Seems that Python is moving into the enterprise. At the recent PyCon it has become apparent that it's not just Google, GIS, Nokia or even Microsoft anymore. The article points out that Python is increasingly becoming a perfectly viable and even preferred choice for the enterprise. More and more companies are looking at Python as a good alternative to past favorites like Java. Will we finally be able to code for living in a language that's not painful? Exciting times!"

Sorry! There are no comments related to the filter you selected.

Which Enterpise (4, Funny)

Anonymous Coward | more than 9 years ago | (#12125843)

TOS or TNG?

Re:Which Enterpise (0)

Anonymous Coward | more than 9 years ago | (#12126070)

There are in fact 7 enterprises.
Enterprise NX-01, NCC 1701, 1701-A, 1701-B, 1701-C, 1701-D, 1701-E.

Jython? (4, Interesting)

Crono (62230) | more than 9 years ago | (#12125844)

Aren't some of them using Jython, which is really just Python on top of Java anyway.

Re:Jython? (0)

Anonymous Coward | more than 9 years ago | (#12125863)

I don't know about that, but I would have thought Perl was a better fit for the enterprise, due to Python's lack of 'hash references', and the paucity of modules Python has compared to perl.
Various resource on the Internet seem to agree with me [adequacy.org] .

Re:Jython? (5, Insightful)

pogofish (514289) | more than 9 years ago | (#12125864)

The Jython language is still (essentially) an older version of Python. Just because it runs in a Java VM and can integrate with Java classes doesn't moot the point about doing enterprise work by "coding in a language that isn't painful."

Too bad... (-1, Troll)

Anonymous Coward | more than 9 years ago | (#12125988)

it's still slower than molasses flowing uphill on a cold day.

Let's face facts. I don't care who you are, what you think or what emotional attachment you have to Java, all interpreted or VM based languages are SLOW!!!!

I would say that out of all of them, including .NET/MONO, Perl is the fastest. But, it's still slow when compared to a compiled language like C or C++.

Now don't get me wrong, these "scripting" languages do have their place. Rapid Application Development(RAD) is one of their biggest advantages. But, RAD should be for prototyping and testing. It shouldn't be used for the final product. Use Python or Java or whatever you prefer to develop the prototype but, once you've fleshed out all the ideas, for God's sake, rewrite the application in a real language.

"Processors are cheap." and "Disk space is cheap." are horrendous excuses for bad programming. If you have used these expressions to justify your application, you are a bad programmer!

Re:Too bad... (4, Insightful)

zootm (850416) | more than 9 years ago | (#12126017)

"Processors are cheap." and "Disk space is cheap." are horrendous excuses for bad programming. If you have used these expressions to justify your application, you are a bad programmer!
"Bad programming" has many points to it. I'd include using an old-fashioned language like C or C++ in a system which does not require huge speed or efficiency (which is almost everything these days). It increases the development time of a project, increases the code complexity, increases the chances of runtime bugs, and increases the potential severity of what bugs you do have.

I'm sorry, but the "but it's slow" argument does not hold for most software designed today. Let's please get over it.

GNAA SUPPORTS PYTHON (-1, Troll)

Anonymous Coward | more than 9 years ago | (#12125849)

gay nigger association of america's prefered enterprise development language is python. http://www.internet-terrori.st/ [internet-terrori.st]

Python Moving into the Enterprise (-1, Redundant)

mrsev (664367) | more than 9 years ago | (#12125852)

....Oh you mean Trek?

Enterprise NOT The Enterprise

Advantages? (4, Interesting)

voss, sometimes... (873034) | more than 9 years ago | (#12125857)

Im not a coder my self, altough I hahe programmed in Java and in python, but I fail to see Python's advantages comparing to Java in an enterprise environment.

Besides... wasn't Star Trek cancelled?

Re:Advantages? (2, Interesting)

m50d (797211) | more than 9 years ago | (#12125868)

http://netpub.cstudies.ubc.ca/oleary/images/python _java_comparison.gif [cstudies.ubc.ca] may give you an idea. Quite simply it's easier to program in, and you're more productive using it.

Re:Advantages? (1, Insightful)

Anonymous Coward | more than 9 years ago | (#12125879)

Until you find out that you need to code most everything from scratch due to the lack of standardized libraries and frameworks, and you can throw the whole "productivity" argument out the window.

Re:Advantages? (4, Informative)

archeopterix (594938) | more than 9 years ago | (#12125908)

Until you find out that you need to code most everything from scratch due to the lack of standardized libraries and frameworks, and you can throw the whole "productivity" argument out the window.
I'm curious about that, since my experience with Python is just the opposite - everything from http stack, unit testing framework to xml parsing is in the standard lib. Please name at least one area where Python standard library is lacking functionality.

Re:Advantages? (1)

Klivian (850755) | more than 9 years ago | (#12125912)

Yes there sometimes can be hard finding good libraries for Java and that can be a real problem. On the other hand are the availability of libraries for Python quite good and in addition it's rateher easy to make standard libraries made with c/c++ available to Python.

Re:Advantages? (3, Insightful)

aldoman (670791) | more than 9 years ago | (#12125892)

I agree -- Python is fantastic for quickly building small apps, or even much larger ones.

The problem arises in Python's web programming support. The documentation is pretty much non-existent and you can soon get module-overload when you are importing more and more modules to do fairly simple stuff in web apps.

Sometimes I just think while Python is most certainly a far better designed language, PHP/ASP.NET (C#) seems much more 'pratical', and it's definitely much easier to quickly build web apps in.

Is there much effort to improve Python's web support? A manual with similar completion of php.net would help it go a lot lot further.

Re:Advantages? (3, Informative)

BasilBrush (643681) | more than 9 years ago | (#12125932)

If you haven't already, you want to get hold of a copy of
Foundations of Python Network Programming [amazon.com] .

My only experience of web progamming in Python is the client end, for web-scraping scripts, and its great for that. The one problem I have is that once in every few hours urllib2 locks up whilst trying to get a page from a particular site.

Re:Advantages? (2, Interesting)

platypus (18156) | more than 9 years ago | (#12125985)

Really, try Zope [zope.org] .
Yes, it's a little bit of a learning courve, but (and I did all of them for a living) it be beats Java/Tomcat/Struts and PHP hands down in productivity/maintainability once you get a grip on it.

Re:Advantages? (4, Informative)

afd8856 (700296) | more than 9 years ago | (#12126002)

Do yourself a favor and sacrifice 3 months of your life learning Zope & Plone. If you're into web development, it will pay off big at the end.

It's like: why build your own search engine, security engine, your own membership system, html form engine, templating system, cache engine, skin system, content types & custom types, etc, when you can just use zope & plone and get a complete framework with open source products and addons on which thousands already develop at the highest profesional level?

I admit that Plone and zope suffer from some documentation problem, but it's possible to overcome that. There are free books, available online (Zope book and The Definitive Guide to Plone) that can get you through. The documentation on Plone.org is getting very good. There are several code repositories (collective is one of them and some on zope.org) that have example products. Also, read the sources, they're not that hard to understand.

And before any of you jump and shout Booo!! ZODB, let me remind you that you can use just as well a reqular sql server to store your content information.

Re:Advantages? (1)

Anonymous Coward | more than 9 years ago | (#12125894)

You're aware that image is a joke, right?

Re:Advantages? (1)

khuber (5664) | more than 9 years ago | (#12125895)

If that isn't a stupid example, I don't know what is.

The Java code is written so it looks verbose.

Re:Advantages? (1, Funny)

Anonymous Coward | more than 9 years ago | (#12125943)

so is the python code

Re:Advantages? (2, Insightful)

voss, sometimes... (873034) | more than 9 years ago | (#12125896)

Good point, but bad example.
If you take out comments, which one is more easier to read?

I have nothing personal against Python, actually I can say that I am a fan of python, but let's use a right tool for a right job.

Re:Advantages? (1)

m50d (797211) | more than 9 years ago | (#12125939)

In that example, about the same. Python has the advantage for being shorter, and "print" makes more sense immediately than System.out.println. Using new makes things a little clearer on the java side, but only a little. Declaring class members possibly makes it a bit more readable. But the python meaningful indentation makes things a lot clearer. The braces just get in the way, plus they mean it's possible to indent deceptively, by accident if nothing else.

Re:Advantages? (1)

Anonymous Coward | more than 9 years ago | (#12125907)

Please.. The java version is full of obvious and noninformative comments. A sane version of the java program would be more like:

public class Hello{
String myMame = "Duke";
public void sayHello(){
System.out.println("Hello " + myName);
}
}
public class clientHello{
public static void main(String[] args){
Hello h = new Hello();
h.sayHello();
}
}

This version is 12 lines compared to 9 for python. Python has some things that you definately miss in java (lists spring to mind), but its not *that* much more verbose than python.

Re:Advantages? (4, Insightful)

NeoBeans (591740) | more than 9 years ago | (#12125920)

Amsing site, but... it didn't answer the original question. It just shows a comparison of two "Hello World" programs.

The one thing that Java has going for it are "standard" APIs you can bank on. Is there a standard set of enterprise APIs for Python akin to J2EE?

And all of this isn't to say that one can't leverage both technologies [bea.com] where appropriate, even in commercial products...

Re:Advantages? (2, Informative)

srid (864845) | more than 9 years ago | (#12125970)

The one thing that Java has going for it are "standard" APIs you can bank on. Is there a standard set of enterprise APIs for Python akin to J2EE?

I am not trolling, but isn't the standard Java API painful to program with. Who wants to code 4-5 lines just for opening a file?

In any case, there is PEAK [telecommunity.com] for Python.

How not to win the corporate mind. (3, Insightful)

NeoBeans (591740) | more than 9 years ago | (#12126046)

Take a look at the documentation for PEAK here [telecommunity.com] . Now, take a look at the documentation for J2EE courtesy of Sun (API docs [sun.com] , tutorials [sun.com] , and the specifications [sun.com] ).

For good measure, let's look at the documentation from a J2EE vendor here [bea.com] .

While PEAK sounds intriguing, I'm not sure that major projects started by Fortune 100 globals will leverage a technology that lacks the level of documentation quality you can find in other products in that space.

I bring this up because documentation is often an indicator of the level of quality you can expect in terms of support. This is not to say PEAK is bad or poorly written, just that the supporting documentation and resources don't match those available for J2EE implementations.

Remember -- it isn't the best technology that wins, but the technology that is most accessible. In the case of enterprise APIs, even though PEAK may be easier and more scalable (and this is an excerpt from their page): But PEAK is different from J2EE: it's a single, free implementation of simpler API's based on an easier-to-use language that can nonetheless scale with better performance than J2EE. ...it will need some time and some nurturing in order to compete for mindshare with developers and non-technical decision makers.

Re:Advantages? (1)

vhogemann (797994) | more than 9 years ago | (#12125993)

Well, If you're using Jython to pave the road for a migration, you can use whatever you want from Java. Also, using Jython is a way to keep your codebase. I think that's the real advantage of python/jython, it's a nice "glue" language, that you can use to build applications based on whatever you already have.

Re:Advantages? (1)

CastrTroy (595695) | more than 9 years ago | (#12125935)

Looking at that picture turns me right off python. Just because you can do something in less code, doesn't mean it makes it a better language. Also, it's interesting that the Java example defined 2 classes, and then Python example only defined one. The Python example seemed to be doing the execution part outside of any class, in some non-object oriented fashion.

It also appears that Python has no comments. There's no visible barrier such as } to say where the class or function ends, and the person doing the programming didn't really care to point out where it was, even though they did in Java, where it's obvious, because there is a }. I know in Python it's "obvious" because you can see where they stop indenting. But that's there in Java too, it's not forced, but any good programmer does that anyway, and most IDE's do it for you. This is where languages like Java really shine. By being object oriented from the ground up, and not just having OO as a new feature, like C++, VB.Net, PHP, and a few other ones out there.

This usually leaves code in a mess somewhere between being object oriented and not being object oriented. This is not a place where you want your code to be.

Re:Advantages? (2, Interesting)

rmccann (792082) | more than 9 years ago | (#12125948)

A poor example. The java code is only longer because of all the braces. That example implies the only strength python has is lack of braces.

Less Time Coding, More Time Debugging/Maintaining (1)

BarryNorton (778694) | more than 9 years ago | (#12125952)

Not that I think Java is the ideal example of a modern programming language (far from it), but this trend towards 'lean' scripting languages where almost every bit of rubbish you can write is executable, and every bit of code you look back at (even your own code two days later) looks like rubbish is really troubling.

Is it just because there are more and more people writing code who've never had to work on maintaing large-scale software?

Re:Advantages? (1)

FidelCatsro (861135) | more than 9 years ago | (#12125954)

ofcourse i prefer ruby::
ruby puts "hello world"
or how about shell:: echo "hello world"
Examples like this are not fair , however i do belive python is easier than java

Re:Advantages? (0)

Anonymous Coward | more than 9 years ago | (#12125983)

in python you can just say

print "hello world"

and you have a 1 line valid python application.

The example was comparing creation of an object with a constructor and a method.

Re:Advantages? (0)

Anonymous Coward | more than 9 years ago | (#12125967)

Why would the longer code be worse? Isn't the whole idea readability and maintenance? After all, the original cost of coding is only something like 20% of the TCO.

Re:Advantages? (1)

MemoryDragon (544441) | more than 9 years ago | (#12126048)

That easier to program is a myth which totally fails once programs become bigger. Besides that python does not bring anything really new to the table and is awkward in its handling of blocks. The only advantage python has is that every once in a while it is mentioned there are around 20 zealots which never did anything bigger than a few hello worlds start to scream how wonderful this language is. If you really need a good scripting language python does not really beat it, it is sort of an object pascal with a few safety nets removed and some bunch of lisp added (lambda functions). If you need a good scripting language go for Ruby, but neither of those I would use for a really big system.

Re:Advantages? (0)

Anonymous Coward | more than 9 years ago | (#12125903)

Unless these enterprises base their businesses on "Hello World", I don't see the relevance of that image.

Re:Advantages? (1)

TheoMurpse (729043) | more than 9 years ago | (#12125942)

I have programmed in both, and Python gets the job done so much faster that I want to crap my pants. Now that is REAL ultimate power. I love Python with all of my body (including my pee pee).

Hey timothy (-1, Troll)

Anonymous Coward | more than 9 years ago | (#12125858)

Why don't you go have more sex with Roland Piquepaille?

Re:Hey timothy (-1, Offtopic)

TeleoMan (529859) | more than 9 years ago | (#12125872)

I think parent meant more GAY sex with Roland. Right?

Re:Hey timothy (0)

Anonymous Coward | more than 9 years ago | (#12125916)

Yes.

Good: (5, Funny)

TeleoMan (529859) | more than 9 years ago | (#12125862)

Maybe it'll eat Archer's stupid little dog.

Take a cue from Jack.... (-1, Offtopic)

Anonymous Coward | more than 9 years ago | (#12125956)

MELVIN UDALL
in the hallway... Well past 50... unliked, unloved, unsettling. A huge pain in the ass to everyone he's ever met. Right now all his considerable talent and strength is totally focused on seducing a tiny dog into the elevator door he holds open.

MELVIN UDALL
Come here, sweetheart... come on.

ON DOG
Sniffing at a particular spot on the hall carpeting. Melvin lets the elevator door close and advances on the mutt who has ignores him.

MELVIN UDALL
Wanna go for a ride? Okay,sweetie?

The dog lifts his leg at the precise moment Melvin lunges and picks him up with a decisive heft -- so that dog urine squirts the hall wall for a second or two. The DOG sensing a kindred spirit starts to GROWL and BARK.

MELVIN UDALL (a malevolent tone)
You've pissed your last floor, you dog-eared monkey.

The dog takes a snap at Melvin, but the man is much meaner and quicker than the dog -- he holds his snout shut with his hand and reaches for the door of the garbage chute.

MELVIN UDALL
I'll bet you wish you were some sort of real dog now, huh? Don't worry... this is New York. If you can make it here, you can make it anywhere, you know? You ugly, smelly fuck.

And with that, he stuffs him in the garbage chute and lets go. We hear a FADING SERIES of PLEADING "ANOOOOS" from the DOG fade to nothingness..

No such thing (5, Funny)

RicardoStaudt (848723) | more than 9 years ago | (#12125866)

"Will we finally be able to code for living in a language that's not painful?"

Dude, programming for the enterprise without the pain is like the Passion of the Christ without the crucifiction... It's Impossible.
In that case, Perl should fit perfectly.

Re:No such thing (3, Funny)

AndroidCat (229562) | more than 9 years ago | (#12125963)

"Programming is pain, anyone that says different is selling something."
- The Dread Programmer Roberts.

Re:No such thing (0)

Anonymous Coward | more than 9 years ago | (#12125973)

Cut it out! I mean it! Anyone want a peanut?

Re:No such thing (0)

Anonymous Coward | more than 9 years ago | (#12126038)

Inigo: Fezzik! Fezzik! Listen. Do you hear? That is the sound of ultimate suffering. My heart made that sound when Rugen told me to port our Enterprise Resource Management sytstem to VB and IIS. The Man in black makes it now.

python performance (4, Interesting)

khuber (5664) | more than 9 years ago | (#12125867)

Python is a nice language, but it's excruciatingly slow. It's below Tcl on The Computer Language Shootout [debian.org] , which is telling.

Re:python performance (4, Insightful)

Sweetshark (696449) | more than 9 years ago | (#12125915)

The Computer Language Shootout is pretty useless - often there is a reference implementation in C and the task is to code the *same* algorithm in other language. This ignores the fact that there might be better ways to solve the problem in the other languages. Or in almost all languages. Just take a look at the fibonacci test - it a stupid useage of recursion, if your compiler doesnt optimize out all the duplication. Ok, that would be a nice feature, but it just shows "This language/compiler is good at optimizing bad written code".

Also you can make the shootout say almost anything, for example if you also calculate the code lines in and weight pidigits with a 4 multiplier, Python comes up as the best of the "serverside languages" (Perl, Python, Java, PHP ..)

Re:python performance (1)

bani (467531) | more than 9 years ago | (#12125961)

if you feel you have better python code to perform a task on the benchmark, feel free to submit it.

try http://shootout.alioth.debian.org/sandbox/benchmar k.php?test=mandelbrot&lang=all&sort=fullcpu=all [debian.org] for example.

producing code speaks louder than complaining that the benchmark is useless.

Re:python performance (5, Interesting)

Sweetshark (696449) | more than 9 years ago | (#12126030)

If you feel you have better python code to perform a task on the benchmark, feel free to submit it.
Actually I tweaked around with the code - but the rule of the game are just wrong. Just look at the fibonacci test. It requires you to do the stuff completely recursively - thats one of the rules. So you not only generate a huge return stack, you also calculate all the fibonacci numbers far too often. This is just braindead. A good requirement would say: "Calculate the nth fibonacci number". A simple solution would be to start from the beginning and not recursively calulate every fibonacci number bazillion times.

Ok, the test description says that its task is to show the performance of recursion. But then they have to find a task where recursion is an merit - not a flaw. Otherwise you could claim your language is best because it has the best performing idle loops [slashdot.org] ....

Re:python performance (4, Insightful)

The Famous Brett Wat (12688) | more than 9 years ago | (#12125937)

I think that Python is supposed to be better in benchmarks not listed on that page, such as "mean time to correctly add a feature to unfamiliar code, written by someone who has since left the company".

Re:python performance (1)

ajs (35943) | more than 9 years ago | (#12125941)

Well, to be fair, TCL had a fairly decent model for getting speed out of a string-re-evaluation language. Of course, it was also one of the world's most painful languages to program in....

I wrote a few largish things (all pieces of much larger things) in TCL. It was fun, but frustrating to debug, and annoying trying to keep levels of re-evaluation straight at times.

Back to Python: work continues on Parrot-based Python which provides a very nice JIT compiler, and has demonstrated some execellent speed returns. Of course, it's all fairly early, but given the existance of Pugs on the Perl 6 side pushing Parrot development into overdrive, I expect to see a real-world-useable Parrot fairly soon.

Ruby is also a nice choice if you're looking for a bit more performance in your HLL.

Re:python performance (3, Insightful)

arevos (659374) | more than 9 years ago | (#12125960)

I've never had any problems with Python's speed. It's fast enough for web applications. It's fast enough to use GUI toolkits. It's even fast enough for simple OpenGL demos [monkeyengines.co.uk] (a shameless plug, I know, but it seemed relevant).

If you come across a situation where Python is too slow for what you want to do, then Python can work happily enough with libraries programmed in C. If that's still not fast enough, then use a different language. But I suspect that for 95% of all programming tasks, Python is fast enough.

Microsoft's involved? (3, Insightful)

The Amazing Fish Boy (863897) | more than 9 years ago | (#12125869)

I don't know whether to be happy or afraid.

Re:Microsoft's involved? (2, Interesting)

m50d (797211) | more than 9 years ago | (#12125874)

Happy. It's open, and could be a sign that MS is actually "getting it". Besides, it's already possible to do python under java, but IronPython looks better, and MS is employing the guy who does it.

Embrace and Extend (1)

The Amazing Fish Boy (863897) | more than 9 years ago | (#12125927)

Happy. It's open, and could be a sign that MS is actually "getting it".

I wonder if anyone said that when they introduced IE.

Did anyone else think... (3, Funny)

lxt (724570) | more than 9 years ago | (#12125871)

...Monty Python was merging with Enterprise? Now there's a show I'd like to see... :)

Re:Did anyone else think... (1)

m50d (797211) | more than 9 years ago | (#12125978)

Does this mean parker-stone are no longer going to be involved? Or is Monty Python helping them out? That would be sweet

before RTFA (0)

FidelCatsro (861135) | more than 9 years ago | (#12125875)

I had a mental image of a new member of starfleet with an odd name..

However seeing python moving into the enterprise market would be grand .
Python has really come on in strides in the past few years ,it is easy to learn and has a massive collection of librarys for many difrent things , infact i am suprised it has not happend sooner .

Re:before RTFA (1)

m50d (797211) | more than 9 years ago | (#12125881)

I'm not. The reason it's taken so long is the same reason java was so successful in the first place: marketing. There's no one marketing python to enterprises; the fact that it is succeeding shows superior quality will win out in the end. Good for Linux, no?

Support (1)

FidelCatsro (861135) | more than 9 years ago | (#12125913)

Marketing and support , Python is in dire need of some big name support , This is one of the primary reason Java became such a large player in the enterprise market .

Disclaimer: Newsforge is part of OTSG... (0)

Anonymous Coward | more than 9 years ago | (#12125877)

and Cameron Laird is an unabashed Python booster who's been writing the same booster prose for years. You're actually arguing Python is ready for the enterprise because Cameron Laird went to a Python conference full of Python boosters and saw they were just like him?

Timothy, you may want to check out the definition of "echo chamber."

Toolsets (5, Informative)

justanyone (308934) | more than 9 years ago | (#12125878)

I work at an Application Service Provider startup with 16 employees (5 developers) using Python (30K lines+).

I have 6 years of Perl development plus another 8 in C. So, a newcomer to Python (about 2 months now), I have several reactions shaded by that experience:
* Nice syntax: Not perfect, but very passable overall.
* Love the no-brackets: Indentation as a means of delineating code blocks is great; there's no debate over where to put squiggly braces (the 'if test { statement; } stuff;
* Immature toolsets: there are very few mature toolsets yet. We're using SQLObject, which is in version 0.6, as an object-relational-mapper. It's got some limitations and is admittedly not 'enterprise ready'. it's hard to compare to the Perl DBI because the dbi just is an interface and doesn't do mapping.
* Lack of CPAN: the single most fantastic "tool" I've found in my programming career (15 years) has been CPAN. Got a problem? Someone has probably already seen it and started a solution. I know this is in the works for Python but the tools are not all there yet.
* Syntax (bad): Lack of a requirement to declare vars before use. I really would like the ability to require that all vars are explicitly declared before being assigned to. it would help coding reliability.

Just my 5 cents.
-- Kevin

Re:Toolsets (0)

Anonymous Coward | more than 9 years ago | (#12125899)

Indentation as a means of delineating code blocks is great

Ugh, kill me now

Re:Toolsets (0)

Anonymous Coward | more than 9 years ago | (#12125931)

>Indentation as a means of delineating code blocks is great

Awesome! An even less readable method than {}'s I didn't think it was possible!

Re:Toolsets (0)

Anonymous Coward | more than 9 years ago | (#12125946)

Tried it? It works perfect for me. Using indentation you can actually see the structure of your code. If it looks good, it is good. No need to hunt down that missing bracket.

Re:Toolsets (0)

Anonymous Coward | more than 9 years ago | (#12125965)

Try Ruby instead. With your C experience you will find writing C extensions *much* easier in Ruby than Perl.

Re:Toolsets (1)

krumms (613921) | more than 9 years ago | (#12126011)

* Nice syntax: Not perfect, but very passable overall.

I agree.

* Love the no-brackets: Indentation as a means of delineating code blocks is great; there's no debate over where to put squiggly braces (the 'if test { statement; } stuff;


This would save me from so many religious debates regarding other people's opinions of how my curly braces should be placed, it's just not funny.

* Immature toolsets: there are very few mature toolsets yet. We're using SQLObject, which is in version 0.6, as an object-relational-mapper. It's got some limitations and is admittedly not 'enterprise ready'. it's hard to compare to the Perl DBI because the dbi just is an interface and doesn't do mapping.

I've also found this to be the case, and I'm honestly surprised there isn't a more powerful object-relational data access framework for python. Even the basics of Hibernate would be great.

* Lack of CPAN: the single most fantastic "tool" I've found in my programming career (15 years) has been CPAN. Got a problem? Someone has probably already seen it and started a solution. I know this is in the works for Python but the tools are not all there yet.

I too look forward to something similar to CPAN for Python. Hopefully it's more useful than PEAR though (for which I've only ever found a use for two or three libraries)

* Syntax (bad): Lack of a requirement to declare vars before use. I really would like the ability to require that all vars are explicitly declared before being assigned to. it would help coding reliability.

To me, this would sort of be a waste of time - I mean, how do you suggest that would work? Something like:

var name
name = 'Bob';

? Python is dynamically typed, so declaring "name" gives us no further information about the variable "name" other than the fact it exists (which is pretty well obvious just by looking at the assignment). I sort of see where you're coming from, but I don't think this sits well in a dynamically typed language - which is why you don't see it in PHP, Ruby or Perl. You can do something like:

my $var;

in Perl, which is only necessary because everything's a global in Perl unless you explicitly say otherwise (which is nasty, IMO).

One thing I could see a use for is automatic runtime type checking, but that's a whole other post.

Re:Toolsets (1)

Gorny (622040) | more than 9 years ago | (#12126018)

The Vaults of Parnassus is a great resource for Python stuff. http://py.vaults.ca/ [vaults.ca] . It doesn't have a CPAN like interface for it though.

Then there's the python http://www.python.org/pypi [python.org] which afaik can easily be accessed through the setup.py from Python distutils. If it's not implemented yet it's not even that big of a deal with all the native http/url/xml from Python.

I, for one, think a CPAN like interface to the PyPi or Vaults are great.

Eh? (1)

Donald Ferrone (863523) | more than 9 years ago | (#12125882)

Sorry guys; April Fools' was two days ago.

Captins log (0, Offtopic)

GtKincaid (820642) | more than 9 years ago | (#12125891)

Star date 3042005 , we have recently encounter a strange spacial disturbance , The computers logs seem alterd and for some odd reason the Starfleet logo on the lcars monitors is replaced by a cartoon snake . Voice commands have been replaced with typing #! /usr/bin/env python

sigh... how about a real opinion? (4, Insightful)

paRcat (50146) | more than 9 years ago | (#12125893)

The first dozen replies are all trolls, so I'll add my experiences for posterity's sake.

I've been using python for pretty much anything in my company that isn't web based, and things couldn't be better. There's talk about python being slower, which it is, but most libraries that do important things are just C wrappers anyway, so the speed decrease is negligible as python is just holding the logic. Tk is nice enough, I guess, but I tend to use wxPython. Either way, it gives you cross platform GUIs, which is always a nice thing. Using pyexe allows you to even 'compile' scripts into exe files with win32 machines.

To be absolutely honest though, I can't think of an easier language to learn (I even teach >40 yo women now and then!) or a quicker language to code in. Once you're accustomed to it, the code just flows out, and I've seldom been disappointed by the results. The formatting requirement helps to ensure that your code isn't a disgusting mess that no one can figure out, YMMV.

Re:sigh... how about a real opinion? (-1, Offtopic)

Anonymous Coward | more than 9 years ago | (#12125962)

the women you teach, 40ish,

are they hot? that wood make a big difference.

annoying languages (0, Troll)

Anonymous Coward | more than 9 years ago | (#12125900)

no matter what cool features it has nothing is going to make me want to code in a language where you have to bung the self reference into the signature of class methods.

php is annoying enough with $this-> accesses to everything

can't somebody spend a bit more time on the basics?

Economics (1, Insightful)

Anonymous Coward | more than 9 years ago | (#12125909)

Python has a reputation for being quick to program in. If you just speak basic python, you can program the same stuff you could in qbasic. It is very comparable to Visual Basic at that level. I find it very good for quick-and-dirty stuff.

The difference from the simpler languages is that it can do very difficult things. Once you get used to some of its unique features (I remember how thrilled I was to discover dictionaries) you can put serious applications together a lot faster than with other languages.

The bottom line is that you can do serious applications a lot faster than you can with other languages. In a business environment, that translates to profit.

p.s. "Integrated development environments (IDEs) are also more numerous than polished." Yep, I use emacs.

Please enlighten me (1)

bogaboga (793279) | more than 9 years ago | (#12125914)

I know that Java is used to push realtime market/financial data to a possible countless number of hosts. One only has to visit http://www.refcofx.com/FinanceChart.html?symbol=EU R/USD [refcofx.com] to see java in action, (assuming the java runtime is installed). Can one use Python to do the same? Where would it play its role? The backend or on client machines?

Re:Please enlighten me (1)

srid (864845) | more than 9 years ago | (#12125950)

One only has to visit http://www.refcofx.com/FinanceChart.html?symbol=EU [refcofx.com] R/USD to see java in action, (assuming the java runtime is installed). Can one use Python to do the same? Jython [jython.org]

Re:Please enlighten me (1)

srid (864845) | more than 9 years ago | (#12125959)

One only has to visit http://www.refcofx.com/FinanceChart.html?symbol=EU [refcofx.com] R/USD to see java in action, (assuming the java runtime is installed). Can one use Python to do the same? Where would it play its role? The backend or on client machines?

Jython [jython.org]

Re:Please enlighten me (1)

Sweetshark (696449) | more than 9 years ago | (#12125968)

Can one use Python to do the same?
Not as a applet.
Where would it play its role? The backend or on client machines?
A little interface script on the server connecting to a database (like PHP does now most of the time.) Or to previde a complete [plone.org] CMS [zope.org] . On the clientside either XUL in Mozilla is still a Toolkit [faser.net] to be discovered [anisolution.com] or a browserindependant Python-client (Python is well integrated with native Toolkits, for example via wxWindows - used in bittorrent).

Re:Please enlighten me (1)

sql_noob (855995) | more than 9 years ago | (#12125995)

For client side it's better to use java, the java is already installed for most system. It is also standard and work fine on all systems.
In Python, it can use mod_python+rrd for server side, the result is a simple chart. Or just provide the data on the server side and run a python program on client side (python+wxWidgets/pygtk), py2exe is recommended to avoid dependence problems.
Python is better for simple things, simple solutions. In the company that I work, there are no IT departments. So I use python programming to increase productivity.

A quick check on Dice.com (3, Interesting)

thammoud (193905) | more than 9 years ago | (#12125919)

for Python jobs. It returned 312 jobs. Java returned 9196. I don't think Python will ever dent Java's dominance in the enterprise. Do you really expect Python to do what .NET has failed to do? Not a chance. It is a cute scripting language. No more and no less. Python competes with Perl and Ruby.

Re:A quick check on Dice.com (5, Insightful)

jimicus (737525) | more than 9 years ago | (#12125951)

Had you done the same test 8 years ago but searched for Java versus C/C++, you'd probably have seen the exact same results.

No dice (0)

Anonymous Coward | more than 9 years ago | (#12125976)

had you used something other than a 6sided die your results would be different.

Besides Python is evil, why would i use that which poisoned eden.

Re:A quick check on Dice.com (1)

thammoud (193905) | more than 9 years ago | (#12126066)

The role of Java vs. C/C++ is clearly defined. Provide a fairly portable platform that eases business application development. I just do not see what Python gives me above Java. I don't need some trivial examples of syntatic sugar that Python has. Give me a real business reason that will cause enterprise developers to abandon Java and move to Python.

There simply isn't a a business application development platform that has more industry and development muscle behind it. Microsoft and all its money has not dented Java's dominance in the enterprise. Just Check C# or .NET vs Java on Dice. Pretty sad given the billions that MS has spent.

Re:A quick check on Dice.com (2, Interesting)

FidelCatsro (861135) | more than 9 years ago | (#12126029)

Alot of us never thought PHP could make a Dent in perl , but it did.
if you had checked for python jobs just 2 years ago i would be amazed if you could find any .312 is a dent although a small one , and yes i do expect it to do what .Net has failed to do this as .NET has no real advantages over Java in the enterprise market , and the dependance on MS OSs is a real disadvantage in a market where Solaris etc still play a sizable part
(mono is not an option right now).
Python is able to run on all of these systems , Python has been proven over the years as a strong language and most importantly Python has the support of the OSS world which is becoming an increasingly large force in the industry .
So maybe right now python cant take over , but 5-10 years down the line you may just see a very difrent picture

Yes, but what about the GUI - speed no problem (4, Insightful)

bblazer (757395) | more than 9 years ago | (#12125921)

While I agree wholeheartedly that python is a wonderful language to code in, I think that it lacks a sting GUI system. Yes wxPython is cross-platform, but without getting overly detailed here, it definately lacks the detail and robustness of SWT or even Swing. Until wxPython can stand up to those, I think the movement to it for more broad based use with be a bit slow. As far as apeed goes, who cares? We are not programming for 286 machines anymore!

Re:Yes, but what about the GUI - speed no problem (0)

Anonymous Coward | more than 9 years ago | (#12125996)

As far as apeed goes, who cares? We are not programming for 286 machines anymore!

Notice the headline. That word Enterprise isn't referring to the show.

You're thinking in terms of desktop computing. Think in terms of massive distributed systems processing millions of requests. The larger the scale, the more apparent the piss-poor performance decisions, and the more expensive the hardware becomes to support such things.

That's when you care.

Re:Yes, but what about the GUI - speed no problem (1)

sql_noob (855995) | more than 9 years ago | (#12126022)

Totally agree!

I found that the python gui is a distraction. Neither wxpython nor pygtk really ready for production use.

In this moment I dropped GUI and go for simple web programming using mod_python. It is OK for simple things, although debugging is even harder.

Google is not enteprise? (2, Interesting)

vidarlo (134906) | more than 9 years ago | (#12125923)

It [webmasterworld.com] seems [python.org] Google is using Python for a good deal of stuff... And I thought google was enteprise

Python *is* painful (0, Flamebait)

photon317 (208409) | more than 9 years ago | (#12125940)

Who in the 90's writes a language where whitespace has meaning???

Re:Python *is* painful (1)

wookyhoo (700289) | more than 9 years ago | (#12126014)

How about these [oreilly.com] people [oreilly.com] ?

ILM, Rackspace, United Space Alliance to name a few.

Re:Python *is* painful (1)

krumms (613921) | more than 9 years ago | (#12126023)

Who in the 90's writes a language where whitespace has meaning???

Somebody who realises the importance of the semantic structure of program source code.

Re:Python *is* painful (4, Insightful)

justanyone (308934) | more than 9 years ago | (#12126056)

Curly braces { } have always been a stylistic thorn in the side of C, C++, and now Java programmers. I'm sure other languages use them, too.

The old K&R style of doing:
if (test) {
expression;
}
versus:
if (test)
{
expression;
}
this is NASTY in the debates it causes and wars people fight over which is 'right' or 'easier'. For those who don't know, Python doesn't use braces, it uses any consistent indent, as in:
if (test)
expression
Very simple. Reduces line count by 1 or 2 and completely removes the religious debate about brace location. I really like this. There's enough problems debating what the code header/copyright/IDENTIFICATION DIVISION (grin) section's going to look like. "I like #####!" "No, I like #-------!!!", "You Suck!" "No, You Suck!" etc.

Don't knock the lack of braces until you try it. it really does make the code look cleaner.

--Kevin

If Python sucks so bad... (1)

Zontar The Mindless (9002) | more than 9 years ago | (#12125947)

...then why is it found in nearly every Linux distribution? ...and why is there ActivePython? BTW, I've used this with "classic ASP" and, not unlike JScript, it makes it almost a tolerable environment to use it in.

List comprehensions rule.

Re:If Python sucks so bad... (0)

Anonymous Coward | more than 9 years ago | (#12126013)

If Python sucks so bad...

...then why is it found in nearly every Linux distribution?

Because Linux distributions are like garbage cans and there's nothing they won't put in them.

And unfortunately, because of the rediculous web of dependencies that get built from this behavior, it's nearly impossible to clean them up and slim them down. Just try loading a non-graphics (no X) install sometime with most distributions without still having to have a pile of graphics libraries loaded because a billion utilities are linked against them even though you only want to use their command-line mode.

On the other hand, try loading FreeBSD sometime and load just the "bin" distribution. Talk about a clean slate that you can build something on.

Three barriers to enterprise Python (5, Insightful)

blackhedd (412389) | more than 9 years ago | (#12125987)

1) The twenty minute problem
Many programmers, including top ones like Eric Raymond http://www.linuxjournal.com/article/3882 [linuxjournal.com] , are so put off by Python's use of whitespace as a block delimiter that they swear never to touch the language. In my case, this lasted for two years. You need to spend twenty minutes learning the language, after which the whitespace stops being a problem and starts looking like one of the many great ideas in the language. The challenge is getting people past their initial disgust enough to try it.
2) Misperceptions about typing
Many people think agile languages like Python and Ruby are not strongly typed and therefore present scalability problems and can't be used reliably by large teams. But Python and Ruby are strongly typed (unlike Perl)- you don't get type conversions you don't ask for. The real distinction is that the agile languages are dynamically typed rather than statically typed like Java/C++. To truly grasp the notions of "duck-typing" and lazy evaluation of types is as much a stretch as it was to "get" objects for those of us who were around 15 years ago- it's a basic change in how you think. You'll know when you're there, because you'll see in a flash that Java's static type declarations are not only redundant and painful, but they are also in themselves a key source of brittleness in large programs over time.
3) The youngsters' problem
This is probably the biggest barrier: university CS departments have become nothing but Java training courses. In trying to better prepare grads for actual careers, they have added a lot of basic business teaching, which is good. But they no longer bother to give students a real understanding of actual computer science, sticking instead to a cookbook approach using Java. So young people arrive in enterprise IT shops knowing nothing but Java and thinking they know everything, so they are not open to anything requiring a different intellectual approach.

Re:Three barriers to enterprise Python (1)

MemoryDragon (544441) | more than 9 years ago | (#12126069)

The main problem is not the whitespace identation itself, it is more that python like make barks on mixed intendations (aka, once uses tabs the other blanks) which can become a serious problem once you are more than a lone programmer on a project. And as we all know, the lone programmer is a myth. The other stuff like non declarative variables is a problem which many languages share but not having it in python can be a serious problem for bigger projects. At least there is pychecker.

Credit where it's due (1)

hydopower (869406) | more than 9 years ago | (#12126033)

I'm glad to hear it. Python is amazing, and I'd like to see it get the credit it deserves. Whenever I do a big project in it, I'd say I spend about %3 of the time I spend with other languages debugging. About half of that is time spent telling people about how much I love python, because I'm always blown away when every drastically complex feature I implement works perfectly on the first shot. Regarding speed, I've never checked them out, but I'm told there are several ways to dramatically optimize normal python code. Psyco, for instance.

We will start to see alot more of it.. (4, Insightful)

codepunk (167897) | more than 9 years ago | (#12126036)

Soon as the qt windows free version starts shipping I think we will see alot of renewed development of gui stuff in python. Currently wxwindows exists but it is a little funky to program in if you ask me. A good industrial strength redily available qt is going to move alot of things.

It is a great language we use it for everything, web services, linux / win integration, nt services, automation etc.

Python & Xcode? (0)

Anonymous Coward | more than 9 years ago | (#12126039)

Is it possible to use Python with Mac OS X's developer tools and build GUI applications?
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?