Two Laptop Bag*
The moose likes Jython/Python and the fly likes To Python or not to Python? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "To Python or not to Python?" Watch "To Python or not to Python?" New topic
Author

To Python or not to Python?

Marco Bresciani
Greenhorn

Joined: Jan 01, 2012
Posts: 8

I'm a Python newbie... much more than newbie... I've just downloaded from my corporate account one introductory book on Python and I'm just reading the first chapter so... I'm probably The newbie.

Anyway. My question: why should I choose Python instead of Java or Ruby or something else?
Sony Chau
Greenhorn

Joined: May 23, 2012
Posts: 4
I hope this link helps:http://pythonconquerstheuniverse.wordpress.com/2009/10/03/python-java-a-side-by-side-comparison/
Marco Bresciani
Greenhorn

Joined: Jan 01, 2012
Posts: 8

I've always though Java is not the best kid on the block but since it's ("it is", or "it was", as you wish to read) popular, my university taught that and also it's a bit more easier to find a Java-related job. Anyway, since my post on this topic, I've read a bit, checking features and some general things on Python, JavaScript, PERL and Ruby and I've started studying Ruby with its peculiarities... and it seems very nice! Also, forced indenting (even if very nice!) is a bit too forced, for me... at least at the moment.
Thanks for the link.
Steve Fahlbusch
Bartender

Joined: Sep 18, 2000
Posts: 557
    
    7

You shouldn't,

You should learn all of them.......

But that said......

Learn java for applications (large, web apps or stand alone)

Learn python for quick and dirty applications, esp, low level apps

Use them both, but python is quick and nimble

Java will protect you from yourself

One is not better than the other, they are both tools in your toolbox. Learn both
Steve Fahlbusch
Bartender

Joined: Sep 18, 2000
Posts: 557
    
    7

OK, i passed on the official word.

What is really cool about python is that you can dynamically extend any class (yours or build in).

You can add attributes and/or methods to any class when you need to... this is very, very cool
Marco Bresciani
Greenhorn

Joined: Jan 01, 2012
Posts: 8

Steve Fahlbusch wrote:You shouldn't,

You should learn all of them.......

But that said......

Learn java for applications (large, web apps or stand alone)

Learn python for quick and dirty applications, esp, low level apps

Use them both, but python is quick and nimble

Java will protect you from yourself

One is not better than the other, they are both tools in your toolbox. Learn both


You know Steve... I'd love to learn all of them since I move to move out this crazy company I'm working on. Saying to be R&D and still using not old but older and clumsy tools, with unskilled people, difficult daily management, ... it's making me crazy, also because there are "so many things to do" that there is not even time to think about "R&" but only "D"...
So, being at least a bit aware of all those languages should help me be a bit more "agile" in finding a proper new job.

Let's go back to study: Ruby! JavaScript! Python! PERL! Go! Go! Go!
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1621
    
  13

I'm learning Python too, and so far it's great, although I'm not exactly at the stage of building enterprise web applications with it (you probably need to look at a framework like Django for that).

Of course, Steve's right that we should all probably learn Java and Ruby and JavaScript etc as well as Python, but just to help you get started with Python, here's some useful resources:

  • Google's Python Class - Google's in-house tutorial videos and exercises for learning Python.
  • "How to Think Like a Computer Scientist - Learning with Python 3" - free book on learning Python 3 (if you need to work with Python v.2 there is a link to the Python 2 version of the book at http://www.openbookproject.net/thinkcs/).
  • Dive Into Python 3 - another excellent free book on learning Python.
  • Think Stats - free book on learning statistical programming with Python.
  • Head First Python is a nice introductory book on learning Python, including a quick look at using it with Google App Engine.
  • Programming Python (4th edition) is probably the definitive book on how to do stuff with Python's huge range of libraries (4th edition assumes you're using Python 3).
  • There's also an interesting new book Machine Learning In Action by Peter Harrington, which uses Python to explore various techniques for data mining and machine learning.

  • Python seems to be quite widely used for scientific applications (and increasingly for some financial applications e.g. in the City of London), and it is often available as a scripting language within tools for particular domains e.g GIS. It also pops up in odd places e.g. I've seen it used in WebLogic setup scripts, and it is often used for sys admin tasks as it gives you a platform-independent way to do clever stuff with the various Python libraries. Also, Python is being taught increasingly in the universities as a first programming language, so I suspect we will see more interest in using it, especially outside traditional IT departments, in future.

    Finally, if you're finding the indentation too much work , try using a Python-aware editor e.g. PyDev for Eclipse, or a simpler IDE like PyScripter, which will indent your code for you. And of course, lots of text editors can be configured for Python as well.

    No more Blub for me, thank you, Vicar.
    Marco Bresciani
    Greenhorn

    Joined: Jan 01, 2012
    Posts: 8

    Thanks for the hints! I've decided this sequence: first Ruby, then JavaScript probably together with Python (or Python slightly after JavaScript) and PERL last.

    Let's study!

    Java is probably not dead... but it's not very well, indeed! ;)
    Ahmad Othman
    Greenhorn

    Joined: Dec 21, 2009
    Posts: 1
    Go to python if you need more productivity and the most cleaner code.
    John Holme
    Ranch Hand

    Joined: Oct 11, 2002
    Posts: 54
    What I like best about Python are the libraries that emulate unix commands for working with the file system. Taken together with Python's robust and efficient syntax (and excellent regex implementation), these libraries are so much nicer to work with than either bash or java for writing utilities that manipulate files and their contents. I don't care to use Python for enterprise-level applications, as I like the features that derive from java's static typing. To get the best of both worlds in a java-centric context, groovy is also nice.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: To Python or not to Python?
     
    Similar Threads
    assignment 1a
    Nice New Forum!
    i need to know this, please, can you answer this questions and be fair
    Generating XML feed for users.
    Java Coding Standards