473,765 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why Python?

I am looking at learning Python, but I would like to know what its
strengths and weaknesses are before I invest much time in learning it. My
first thought is what is it good for programming, however I expect an
answer from the python newsgroup to be something like "everything ". So
maybe a better question is what type of programming projects is Python a
bad choice?

What makes it better or worse than languages like perl, php, delphi, or
c++?

Thanks for your opinions.

Todd.
Jul 18 '05 #1
20 1850
On Mon, 01 Mar 2004 02:11:46 GMT, Todd7 wrote:
I am looking at learning Python, but I would like to know what its
strengths and weaknesses are before I invest much time in learning it.


A Google search that should be helpful:

<http://www.google.com/search?q=%22why +python%22>

--
\ "A politician is an animal which can sit on a fence and yet |
`\ keep both ears to the ground." -- Henry L. Mencken |
_o__) |
Ben Finney <http://bignose.squidly .org/>
Jul 18 '05 #2
>>>>> "Todd7" == Todd7 <No****@please. com> writes:

Todd7> What makes it better or worse than languages like perl,
Todd7> php, delphi, or c++?

perl - both python and perl have many, many external modules written
for them. perl *may* have more. Some people like that perl has CPAN,
a central repository for modules. In my opinion, this is not so
important now that we have google. python is object oriented in its
bones; with perl, OO is a hack. python favors a clean, simple,
obvious syntax, perl embraces "there is more that one way to do it."
For this reason, most python coders feel that python code is easier to
read and maintain.

php - widely used for web development and has a lot of nice packages
in this niche - bulletin boards, database interfaces, and so on.
python will have packages for each of these areas, but they are not as
widely used and are not industry standard, in the way for example that
phymyadmin is. php is not as powerful a programming language as
python is and is not widely used outside the sphere of web
development. See the recent thread
http://groups.google.com/groups?hl=e...%26scoring%3Dd

c++ - a big, powerful, complex language. Good for designing complex
software packages and code where performance is important. Makes
things like file IO, dbase and web connectivity harder than they need
to be. Many who use python favor a mixed language programming style:
use python for most everything, and write (or reuse) C/C++/FORTRAN
extensions for processor/performance intensive parts. There are many
good tools (SWIG, F2Py, boost::python, etc) for automating the process
of creating python extensions of code from these other languages. If
you need high performance code, it's good to know how to write code in
at least one of these compiled languages.

My advice: learn python first. The community is very friendly and
receptive to newcomers (you won't find this on perl or C++
newsgroups). You'll get advice from world experts on coding and
style. python coders value elegant, readable, efficient, well written
code and will give you lots of advice along these lines.

JDH

Jul 18 '05 #3
Qp
Well, I'm new at it (started about 2 months ago in preparation for senior
design project), and the one thing I've seen that could be better is overall
documentation; sometimes it is hard to find what you're looking for
(especially in libraries like Tkinter for GUI programming and Twisted for
network programming). It's possible, just hard.

The good things I've noticed? Well, to do what I've done so far in Java
would have taken at least 5 and probably more like 10 times the code I've
written. A simple yet decent TCP chat server in about 30 lines of code is
something I never considered possible before looking at Python.

"Todd7" <No****@please. com> wrote in message
news:Xn******** *************** ***********@68. 12.19.6...
I am looking at learning Python, but I would like to know what its
strengths and weaknesses are before I invest much time in learning it. My
first thought is what is it good for programming, however I expect an
answer from the python newsgroup to be something like "everything ". So
maybe a better question is what type of programming projects is Python a
bad choice?

What makes it better or worse than languages like perl, php, delphi, or
c++?

Thanks for your opinions.

Todd.


Jul 18 '05 #4
> I am looking at learning Python, but I would like to know what its
strengths and weaknesses are before I invest much time in learning it.


All of the other answers above are good. I would say the followng:

* Python is easy to learn. I learned it in an afternoon -- that's an
experienced programmer. It's ideal for a beginner as well.
* Good cross platform support both windows and linux. Never re-write
code again. Also writes very fast to begin with--good RAD tool.
* To write just about anything all you need to know is python, C/C++,
and a little JavaScript if you want to make web pages. That's it.
Python has a huge application range--small scripts, full up
applications, cgi scripting for the web. You can even integrate it with
the Mozilla platform for local cgi like functions.

What's not good in python:

* If speed is more important than coding time use C/C++ instead.
* If you want to obscruate your code maybe a compiled langague is better.

Rob
Jul 18 '05 #5
Thanks for all the well reasoned replies. I think I will make the
plunge.

Todd7 <No****@please. com> wrote in
news:Xn******** *************** ***********@68. 12.19.6:
I am looking at learning Python, but I would like to know what its
strengths and weaknesses are before I invest much time in learning it.
My first thought is what is it good for programming, however I expect
an answer from the python newsgroup to be something like "everything ".
So maybe a better question is what type of programming projects is
Python a bad choice?

What makes it better or worse than languages like perl, php, delphi,
or c++?

Thanks for your opinions.

Todd.


Jul 18 '05 #6
Todd7 wrote:
What makes it better or worse than languages like perl, php, delphi,
or c++?


I'll focus on the weaknesses of Python instead of the strengths.

1. Computation intense Python programs tend to be slower than optimized
equivalent programs written in languages that compile to native code.

2. Python programs are somewhat difficult to distribute compared to programs
in languages that compile to native code.

3. Some other languages make it easier to detect certain classes of errors
in your code. With a few exceptions, errors in Python code can only be
found by actually running the code or by checking by hand.

4. Python is only somewhat flexible about allowing you to customize the
language from within the language. You can define new functions and new
data types, but no new operators, no new control structures, nor any type of
new syntax. If you need to define a domain-specific language within your
program, Python may not be your best choice.
--
Rainer Deyke - ra*****@eldwood .com - http://eldwood.com
Jul 18 '05 #7
On Mon, 01 Mar 2004 05:12:48 +0000, Rainer Deyke wrote:
Todd7 wrote:
What makes it better or worse than languages like perl, php, delphi,
or c++?

I'll focus on the weaknesses of Python instead of the strengths. [snip] 2. Python programs are somewhat difficult to distribute compared to
programs in languages that compile to native code.


How do you figure this one? Something to do with statically linked
libraries? (I'm a Python newbie, but have been programming in general
for almost 20 years, about half of that professionally. )

Jul 18 '05 #8
Ed Murphy wrote:
On Mon, 01 Mar 2004 05:12:48 +0000, Rainer Deyke wrote:
2. Python programs are somewhat difficult to distribute compared to
programs in languages that compile to native code.


How do you figure this one? Something to do with statically linked
libraries? (I'm a Python newbie, but have been programming in general
for almost 20 years, about half of that professionally. )


Basically you have to distribute the Python interpreter along with your
program, since you generally can't rely on the end user having (the correct
version of) Python installed.
--
Rainer Deyke - ra*****@eldwood .com - http://eldwood.com
Jul 18 '05 #9
2. Python programs are somewhat difficult to distribute compared to
programs in languages that compile to native code.

How do you figure this one? Something to do with statically linked
libraries? (I'm a Python newbie, but have been programming in general
for almost 20 years, about half of that professionally. )


Basically you have to distribute the Python interpreter along with your
program, since you generally can't rely on the end user having (the correct
version of) Python installed.

It's really no harder a dependency to check than for shared libraries or
such with C programs.

Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7378
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.