September 26th, 2004, 05:11 PM
The craze with Python
Recently Python seems to be the talk of the town and I'm just looking for some opinions on Python. Although people seem to love it, it doesn't seem to have the market share as the bigger names such as Java or C++.
So, what types of things have you guys personally done with python? What are some strengths and weaknesses that you find in python? Also, hows the job market for python programmers?
September 26th, 2004, 06:19 PM
I use it for CGI programming and any sort of automation, I can't stand Bash's syntax.
I love the syntax and how you have to use modules to do things, instead of having everything built into the language. I hate that a lot of web hosts do not support it (or at least I don't see it listed when they list PHP and Perl.)
Paul Graham wrote a few articles where he talks about Python that you might be interested in:
September 26th, 2004, 08:57 PM
Awesome, thanks for the reply. Do you recommend any books (print or ebooks) to get started with python. I've visited python.org and it's great but I'm just seeing if there are other good sources to start with.
Also, I know python is big in the linux community, but do you recommend any good ides for the windows environment.
September 27th, 2004, 12:39 AM
Not sure what IDEs are good for Windows.
A book I recommend is O'Reilly's "Learning Python": http://www.oreilly.com/catalog/lpython/ I thought it was good, it's the only physical book I read about Python though.
Another good read is this:
and I hear good things about "Dive into Python", I never read it though.
September 27th, 2004, 01:30 AM
Python is a beautiful language in every respect and it's being used for nearly anything you can think of, from CGI to Games programming to ripping DVDs!
Personally I've been using Python for CGI for a long time now, simply because its makes it very easy to come back too later. And as mentioned, Python is also very good for automation . I've used Python to create a basic ICQ bot, log into Devsheds forums. Then there have been loads of little projects here and there.
In short. If you are familiar with perl, Pythons pretty much on the same level as that. But, as you mentioned, with a smaller market share. So:
Learning Python is a very good book. if your going to start anywhere then thats a good place!
Originally Posted by Some Python Hacker
Hope this helps,
September 27th, 2004, 10:52 AM
Each reply makes Python sound even better . What about performance though, I heard Python is rather slow. True story?
September 27th, 2004, 02:28 PM
No, I don't have numbers but I doubt Python is slow.. Google uses it plus it's used for games, Google for 'pygame'.
If there is something slow in your program you can just write that one part in C or C++ and use it in Python.
September 27th, 2004, 04:21 PM
I say slow because isn't Python an interpreted language? Some links i found:
September 27th, 2004, 05:10 PM
Originally Posted by khu19
Here are some good editors I have tested on my Windows machine :
September 27th, 2004, 06:23 PM
I have programmed in numerous languages over the last 20 or so years, and Python is my favourite.
It is a dynamic, high level language that can be used from tasks ranging from short scripts to full-blown applications. Development in Python is generally considered to be 5-10 times faster than in a static language like C++, Java or C#. It does not have the mind-share that Java, C# or PHP have for web development, although it can compete well with all of them. However there are other areas where it is probably the most popular choice, for example as a game scripting engine, or as a glue language for high performance scientific computing (see scipy, for example).
The speed of Python is not that big an issue. It is compiled to an intermediate bytecode which is then interpreted, just like Java and C# (and PHP, I think). However since Python is dynamically typed the language has to do more work at runtime, which does have some performance impact. There is a python compiler (psyco) that can massively speed up some Python programs, and also several tools for writing python extensions in C or C++ so that speed-critical sections can be optimised. Besides, if you can write your program in a fraction of the time then you have far longer to spend on optimisation. There have been cases of Python programs turning out faster than the Java equivalent since the python programmer has been able to try out several alternative algorithms while the Java developer is still struggling with their first one.
There are implementations of Python for the Java and .NET platforms (Jython and IronPython respectively). IronPython is still very much in alpha, but Jython is quite mature and has been around for years.
The job market in the UK for Python programmers is still pretty thin, but I know of several companies that are developing entirely in Python and they have just as hard a time finding good Python developers.
Dave - The Developers' Coach
September 30th, 2004, 05:45 AM
It's very pleasant.
Indeed, but it also doesn't have the backing or marketing of big names like Sun and IBM. Everything you hear about it is from people who simply like using it.
Scripts to interface with Jabber servers, emailing scripts, MS Office Automation, a script to bring a particular program to the foreground, a web interface to a PostgreSQL database, a GUI to browse Windows event log exports... stuff to make my life easier, really.
Strengths: It's nice to use. Don't underestimate this as a strength.
Weaknesses: No big-name support means no one else has heard of it, so it's hard to sell it to your colleagues or get permission to run it on servers or roll it out to workstations.
It's slow and requires the Python interpreter. Inexperienced users don't know how to install Python and don't want the hassle, experienced users grumble that it doesn't 'just run' and that it isn't a 100Kb executable with no dependencies.
It's not supported by most web-hosts.
There's no up-to-date MS-SQL interface module.
There are no Windows IDEs (Boa Constructor wont count until it does more than crash ).
Pretty crummy, it seems, searches either return one "innovative financial company" or tens of results of the "requires 5 years C++, Java, Shell scripting, knowledge of Perl/Python an advantage" kind.
Don't look at Python if you want a language to get you a high-paying job then.
September 30th, 2004, 07:24 AM
I absolutely love python. It really is a run everywhere language.
The only time recently that I had reverted to C was when I needed to give an app' admin rights under Linux. (To do that in Python you would have to su the interpreter which is a big risk and is I think not actually possible). So I have the situation of a 100k line Python app occupying 5 Mb of memory calling a 30 line statically compiled C app occupying 15 Mb of memory. (Statically compiled to give platform independence. I am sure this can be reduced but I have better things to do!)
Python is slow if used to solve the wrong problems, I wouldn't use plain Python it for multi-media processing You would probably want to use support libraries for such things, even if you wrote it in C - and you can do that from Python too!.
The biggest project I wrote was a script language interpreter - it was capable of running 15k to 40k lines per second on a 1GHz machine. It's speed was more than fast enough for the interfaces it had (multiple serial ports and log files). I could have written it in C or C++ but I estimate I would have only finished some of the scripting engine whereas the Python app had GUI support, report generation, Terminal emulation, script auto-generation, batch processing and documentation and was always being extended as new users requested additional features. Using the dynamic nature of Python I built in the capability for users to write there own Python extensions to the GUI and script language.
Two years on I still get requests for new uses and because of Python's coding rules and consistent methods it is still possible for me to understand what I wrote then.
IMO Python's Windows installer is a piece of cake - what problems do users have?
Most Linux distributions have at least one version installed as standard. (True - it gets interesting under Linux because IDLE and Tkinter are rarely installed by default and you are forced to learn how your OS package management works).
I have noticed that MS .NET framework is > 20 Mb and must be installed to run the new apps. The requirements for support files put Python IMO in the same league as C# and VisualBasic in terms of perceptions and use. So if they are acceptable to users then Python should be okay.
And don't forget the Python community - it's a mixed bag - but one of the friendliest you'll find.