#1
  1. No Profile Picture
    blub blub
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Location
    boston / new york city
    Posts
    136
    Rep Power
    12

    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?

    Thanks
    Kev
    One-nine.com
    Weather Grabber:: weather forecasts to your desktop
    EasyExif:: free Exif data extractor
  2. #2
  3. Cast down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    321
    Rep Power
    11
    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:
    http://www.paulgraham.com/articles.html
  4. #3
  5. No Profile Picture
    blub blub
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Location
    boston / new york city
    Posts
    136
    Rep Power
    12
    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.

    Thanks,
    Kev
    One-nine.com
    Weather Grabber:: weather forecasts to your desktop
    EasyExif:: free Exif data extractor
  6. #4
  7. Cast down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    321
    Rep Power
    11
    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:
    http://www.ibiblio.org/obp/thinkCSpy/

    and I hear good things about "Dive into Python", I never read it though.
  8. #5
  9. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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:

    Originally Posted by Some Python Hacker
    Python won't get you a lot of jobs. But it will get you good jobs!
    Learning Python is a very good book. if your going to start anywhere then thats a good place!

    Hope this helps,

    Mark.
    programming language development: www.netytan.com Hula

  10. #6
  11. No Profile Picture
    blub blub
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Location
    boston / new york city
    Posts
    136
    Rep Power
    12
    Each reply makes Python sound even better . What about performance though, I heard Python is rather slow. True story?
    One-nine.com
    Weather Grabber:: weather forecasts to your desktop
    EasyExif:: free Exif data extractor
  12. #7
  13. Cast down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    321
    Rep Power
    11
    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.
  14. #8
  15. No Profile Picture
    blub blub
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Location
    boston / new york city
    Posts
    136
    Rep Power
    12
    I say slow because isn't Python an interpreted language? Some links i found:

    http://www.tempest-sw.com/benchmark/
    http://www.osnews.com/story.php?news_id=5602&page=3
    One-nine.com
    Weather Grabber:: weather forecasts to your desktop
    EasyExif:: free Exif data extractor
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    Norway
    Posts
    41
    Rep Power
    11
    Originally Posted by khu19
    Also, I know python is big in the linux community, but do you recommend any good ides for the windows environment.

    Here are some good editors I have tested on my Windows machine :
    Good web hosting info - articles about web hosting
    hb's web dev blog
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    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
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    624
    Rep Power
    34
    Recently Python seems to be the talk of the town and I'm just looking for some opinions on Python.
    It's very pleasant.

    Although people seem to love it, it doesn't seem to have the market share as the bigger names such as Java or C++.
    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.

    So, what types of things have you guys personally done with python?
    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.

    What are some strengths and weaknesses that you find in python?
    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 ).

    Also, hows the job market for python programmers?
    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.
  22. #12
  23. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    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!)


    Originally Posted by sfb
    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.
    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.

    grim

IMN logo majestic logo threadwatch logo seochat tools logo