By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,941 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,941 IT Pros & Developers. It's quick & easy.

Is python for me?

P: n/a
Hi,

I'm planning to learn a language for 'client' software. Until now, i
'speak' only some web based languages, like php. As a kid i programmed
in Basic (CP/M, good old days :'-) ) Now i want to start to learn a
(for me) new computer language.

I like Python. Its free, easy to learn and some favorite programs of my
are written in Python / can understand Python (like OpenOffice) etc.

But I'm not a full-time programmer. I know, that I've only time &
possibility to learn one (= 1) language good. So i ask myself is python
the language I'm looking for?

In the future, i want to write the following applications:[*] A database driven program, which can handle my clients, tasks and
places (= 3 tables, has to work relative with each other). I think,
this isn't a problem for Python[*] As a photographer i like to build a picture management system (also
db) with raw support. Raw is the raw-data from the sensor of the
camera. My questions:
- can python encode raw?
- can python head for a utility like dcraw?
- or head for a utility like IrfanView (delphi?) or something like
that?

Tnx for your help!

Nov 13 '06 #1
Share this Question
Share on Google+
22 Replies


P: n/a
In article <11*********************@b28g2000cwb.googlegroups. com>,
lennart <l.*************@gmail.comwrote:
>Hi,

I'm planning to learn a language for 'client' software. Until now, i
'speak' only some web based languages, like php. As a kid i programmed
in Basic (CP/M, good old days :'-) ) Now i want to start to learn a
(for me) new computer language.

I like Python. Its free, easy to learn and some favorite programs of my
are written in Python / can understand Python (like OpenOffice) etc.

But I'm not a full-time programmer. I know, that I've only time &
possibility to learn one (= 1) language good. So i ask myself is python
the language I'm looking for?

In the future, i want to write the following applications:
[*] A database driven program, which can handle my clients, tasks and
places (= 3 tables, has to work relative with each other). I think,
this isn't a problem for Python
[*] As a photographer i like to build a picture management system (also
db) with raw support. Raw is the raw-data from the sensor of the
camera. My questions:
- can python encode raw?
- can python head for a utility like dcraw?
- or head for a utility like IrfanView (delphi?) or something like
that?
Nov 13 '06 #2

P: n/a
As stated above python is capable of all those things, however on
larger applications like that it can tend to slow down a bit. And the
executables do need a little bit of work, because it's bassicly a dll
and a library of all your .pyc files. However python is still a great
language and I would recomend it. And most of these things will
probably be fixed in Python 3000!
Cameron Laird wrote:
In article <11*********************@b28g2000cwb.googlegroups. com>,
lennart <l.*************@gmail.comwrote:
Hi,

I'm planning to learn a language for 'client' software. Until now, i
'speak' only some web based languages, like php. As a kid i programmed
in Basic (CP/M, good old days :'-) ) Now i want to start to learn a
(for me) new computer language.

I like Python. Its free, easy to learn and some favorite programs of my
are written in Python / can understand Python (like OpenOffice) etc.

But I'm not a full-time programmer. I know, that I've only time &
possibility to learn one (= 1) language good. So i ask myself is python
the language I'm looking for?

In the future, i want to write the following applications:[*] A database driven program, which can handle my clients, tasks and
places (= 3 tables, has to work relative with each other). I think,
this isn't a problem for Python[*] As a photographer i like to build a picture management system (also
db) with raw support. Raw is the raw-data from the sensor of the
camera. My questions:
- can python encode raw?
- can python head for a utility like dcraw?
- or head for a utility like IrfanView (delphi?) or something like
that?
.
.
.
Yes.

Yes, Python is generally capable in all the roles you describe.
Perhaps most exciting, though, is that you can try out the
language yourself, TODAY, over the next few hours, and, in no
more time than that, get a realistic if limited idea how it's
likely to work for you. With the right introduction <URL:
http://docs.python.org/tut/ you can be coding usefully in
Python very quickly.
Nov 13 '06 #3

P: n/a
lennart wrote:
But I'm not a full-time programmer. I know, that I've only time &
possibility to learn one (= 1) language good. So i ask myself is python
the language I'm looking for?
Yep! Python is very much a jack-of-all-trades language. I've used it
for similar tasks, including as a front-end for dcraw (I have a little
python script to slurp images from a camera with dcraw and convert them
all to JPEG).

Python has excellent libraries for image manipulation (for example
Python Imaging Library) and for abstracting an SQL database to an
object-oriented form that makes it a snap to work with (I love
SQLAlchemy).

You can learn Python really fast, and it sort of guides you in the
right direction by providing a correct way to do almost everything
without constraining you, so that your code will be consistent and
readable. This, in my opinion, is Python's chief advantage over Perl,
which is the other highly popular dynamic jack-of-all-trades language.
I learned Perl about 10 years ago and loved it for a while, but it's
messy as heck and I find my own code from a few months ago nearly
unreadable... I also spend a lot more time debugging Perl code because
there are so many error-prone things that are silenty allowed rather
than flagged as errors.

I've been using Python for several months and it's just great for
everything. I think it's an ideal first or only programming language!
I've had no reason to write a program in anything else since learning
Python, and I write a LOT of little throwaway programs.

Dan

Nov 13 '06 #4

P: n/a
On Mon, 2006-11-13 at 10:14 -0800, Dan Lenski wrote:
lennart wrote:
So i ask myself is python the language I'm looking for?

Yep! Python is very much a jack-of-all-trades language.
I'll run the risk of being nitpicky, but the full phrase is "Jack of all
trades, master of none," which doesn't do Python justice. Python is a
master of all trades!

But I agree with Dan's sentiment, Python is definitely the language
you're looking for.

-Carsten.
Nov 13 '06 #5

P: n/a

Carsten Haese schreef:
On Mon, 2006-11-13 at 10:14 -0800, Dan Lenski wrote:
lennart wrote:
So i ask myself is python the language I'm looking for?
Yep! Python is very much a jack-of-all-trades language.

I'll run the risk of being nitpicky, but the full phrase is "Jack of all
trades, master of none," which doesn't do Python justice. Python is a
master of all trades!

But I agree with Dan's sentiment, Python is definitely the language
you're looking for.

-Carsten.
Tnx everyone for your response! It's just for me a big step to learn a
new language. Not because of the difficulty, but because of the time
and so.

Later, i remembered that Gimp can also work with python (scripts). So,
even for my second wish, there will be somewhere, somehow a way to do
it.

At least: i use the dutch portal http://python.startpagina.nl/ to start
with. Can you advice me a good Python interpreter, or a good startpage
(as in Python for dummys)?

Lennart

Nov 13 '06 #6

P: n/a

da****@gmail.com schreef:
As stated above python is capable of all those things, however on
larger applications like that it can tend to slow down a bit. And the
executables do need a little bit of work, because it's bassicly a dll
and a library of all your .pyc files. However python is still a great
language and I would recomend it. And most of these things will
probably be fixed in Python 3000!
>>
<<snip>>
Python very quickly.
Can you define 'large'? Is that large in code, or large in database? I
don't know which database is supported. If its a external db, like
MySql, the query is performed through the software of MySql, am I
right? If I'm correct, the 'slowness' comes from the amount of code in
python itself, not from the database.

Nov 13 '06 #7

P: n/a

Not to be picky, but any slowness in software is rarely because of code
size. Rather, it is the data size and algorithms that play the major
role. Only after you got the first two right is that you should worry
about implementation speed.

That said, you are correct. Only if you intend to do *heavy* processing
of the returned data, your major bottleneck should be the database.

*If* you find Python to be slow(for some specific operation, never for
a whole application), you could always rewrite that section using
another language (C/C++ come to mind), or call external libraries to do
the heavy-lifting. The easy integration between Python and C (compared
to a couple other popular platforms) is what drove me to Python.

Make it work first. Then optimize. And Python helps both.
Stephen

lennart escreveu:
da****@gmail.com schreef:
As stated above python is capable of all those things, however on
larger applications like that it can tend to slow down a bit. And the
executables do need a little bit of work, because it's bassicly a dll
and a library of all your .pyc files. However python is still a great
language and I would recomend it. And most of these things will
probably be fixed in Python 3000!
>
<<snip>>
Python very quickly.

Can you define 'large'? Is that large in code, or large in database? I
don't know which database is supported. If its a external db, like
MySql, the query is performed through the software of MySql, am I
right? If I'm correct, the 'slowness' comes from the amount of code in
python itself, not from the database.
Nov 13 '06 #8

P: n/a
In article <11**********************@h54g2000cwb.googlegroups .com>,
lennart <l.*************@gmail.comwrote:
Nov 13 '06 #9

P: n/a
jkn
Hi Carsten
>
I'll run the risk of being nitpicky, but the full phrase is "Jack of all
trades, master of none," which doesn't do Python justice. Python is a
master of all trades!
FYI that's only *one* version of 'the full phrase'. I, for instance, am
a 'Jack of all trades, master of many'. I regard Python in the same
light ;-).

jon N

Nov 13 '06 #10

P: n/a
>
At least: i use the dutch portal http://python.startpagina.nl/ to start
with. Can you advice me a good Python interpreter, or a good startpage
(as in Python for dummys)?

Lennart

--
http://mail.python.org/mailman/listinfo/python-list
check http://www.diveintopython.org/
pretty good book on all the basics, and it's freely available online.
for interpreters, try out SPE http://stani.be/python/spe/blog/ , it is
free, and has some nice features.
And see: http://spyced.blogspot.com/2006/02/p...de-review.html
for a comparison of 4 ide's (including SPE)
Nov 13 '06 #11

P: n/a

Carsten Haese wrote:
On Mon, 2006-11-13 at 10:14 -0800, Dan Lenski wrote:
lennart wrote:
So i ask myself is python the language I'm looking for?
Yep! Python is very much a jack-of-all-trades language.

I'll run the risk of being nitpicky, but the full phrase is "Jack of all
trades, master of none," which doesn't do Python justice. Python is a
master of all trades!
Indeed! That's why I left out the "master of none" prt :-) For me,
Python is "jack of all trades, master of everything I've thrown at it
so far."

Dan

Nov 13 '06 #12

P: n/a
lennart schreef:
[*] As a photographer i like to build a picture management system
Cornice, a cross-platform image viewer, might be a good start.

Features
Here is a list of the main features of Cornice:

* Fully cross-platform: it should run wherever wxPython does;
* Detail and thumbnail view for images;
* Image preview;
* Automatic recognition of images, with a variety of formats
supported;
* Bookmarks;
* Full-screen view;
* Zooming and rotation;
* Slideshow;
* Good keyboard navigation (still not perfect, but this is true for
all the features ;-);
* Image loading from zip archives;
* i18n support (with Italian and French translations available);
* EXIF data support;
* Some more...

For more info, take a look at
http://wxglade.sourceforge.net/extra/cornice.html

Stani

--
http://pythonide.stani.be

Nov 14 '06 #13

P: n/a
On Mon, 13 Nov 2006 09:11:13 -0800, lennart wrote:
Hi,

I'm planning to learn a language for 'client' software. Until now, i
'speak' only some web based languages, like php. As a kid i programmed
in Basic (CP/M, good old days :'-) ) Now i want to start to learn a
(for me) new computer language.

I like Python. Its free, easy to learn and some favorite programs of my
are written in Python / can understand Python (like OpenOffice) etc.

But I'm not a full-time programmer. I know, that I've only time &
possibility to learn one (= 1) language good. So i ask myself is python
the language I'm looking for?
....

I've been hesitant to write this in the past but seems like a good time.

I'm at the same stage, but (and this is NOT a troll) I'm tossing up
between Python and Ruby. I know this has been discussed numerous times but
I'd like to come at it from a different angle.

I've been 'playing' with both languages and to be honest it's a case of 6
of one, half a dozen of the other. If I'm using python I 'think' python
and if I'm using Ruby I 'think' ruby (if that makes sense). Ie I don't
find I'm more productive in one over the other to any great extent (pretty
unproductive in both ATM to be honest ;-)) .

In the foreseeable future I suspect I'll stick with one and just use it
for things I personally will use/need. But (and here's where I finally get
to a question) I use Linux, I love the whole idea of open source and
contributing in some way. So if I ever get to the stage where I can give
something back is one preferred over the other? I would have thought no
but I read on the Ubuntu site somewhere that they prefer contributions
written in Python/ pyGTK?? Is this just a 'preference' or because python
is installed by default? (whereas Ruby isn't)? Is it just Ubuntu or Linux
distros in general?

I hope you can see where I'm coming from here. I don't want to start a
Python/Ruby flame war. That's not the question. The question is "is one
preferred over the other when contributing software and is this just a
particular distros preference"?
cheers,
--
Mark
Nov 14 '06 #14

P: n/a
Mark Woodward wrote:
On Mon, 13 Nov 2006 09:11:13 -0800, lennart wrote:
>Hi,

I'm planning to learn a language for 'client' software. Until now, i
'speak' only some web based languages, like php. As a kid i programmed
in Basic (CP/M, good old days :'-) ) Now i want to start to learn a
(for me) new computer language.

I like Python. Its free, easy to learn and some favorite programs of my
are written in Python / can understand Python (like OpenOffice) etc.

But I'm not a full-time programmer. I know, that I've only time &
possibility to learn one (= 1) language good. So i ask myself is python
the language I'm looking for?
....

I've been hesitant to write this in the past but seems like a good time.

I'm at the same stage, but (and this is NOT a troll) I'm tossing up
between Python and Ruby. I know this has been discussed numerous times but
I'd like to come at it from a different angle.

I've been 'playing' with both languages and to be honest it's a case of 6
of one, half a dozen of the other. If I'm using python I 'think' python
and if I'm using Ruby I 'think' ruby (if that makes sense). Ie I don't
find I'm more productive in one over the other to any great extent (pretty
unproductive in both ATM to be honest ;-)) .

In the foreseeable future I suspect I'll stick with one and just use it
for things I personally will use/need. But (and here's where I finally get
to a question) I use Linux, I love the whole idea of open source and
contributing in some way. So if I ever get to the stage where I can give
something back is one preferred over the other? I would have thought no
but I read on the Ubuntu site somewhere that they prefer contributions
written in Python/ pyGTK?? Is this just a 'preference' or because python
is installed by default? (whereas Ruby isn't)? Is it just Ubuntu or Linux
distros in general?

I hope you can see where I'm coming from here. I don't want to start a
Python/Ruby flame war. That's not the question. The question is "is one
preferred over the other when contributing software and is this just a
particular distros preference"?
Ubuntu is pretty much a Python-oriented distribution. A lot of people
like it because you always get a fairly up-to-date Python with lots of
extras available.

I don't know that much about Ruby, but the best approach to software
development has always been to choose the best language for solving the
problem, so you seem to be doing OK.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Nov 14 '06 #15

P: n/a
By large I mean an application with intensive operations, such as a
fancy GUI maybe a couple of threads, accessing a database, etc.

lennart wrote:
da****@gmail.com schreef:
As stated above python is capable of all those things, however on
larger applications like that it can tend to slow down a bit. And the
executables do need a little bit of work, because it's bassicly a dll
and a library of all your .pyc files. However python is still a great
language and I would recomend it. And most of these things will
probably be fixed in Python 3000!
>
<<snip>>
Python very quickly.

Can you define 'large'? Is that large in code, or large in database? I
don't know which database is supported. If its a external db, like
MySql, the query is performed through the software of MySql, am I
right? If I'm correct, the 'slowness' comes from the amount of code in
python itself, not from the database.
Nov 14 '06 #16

P: n/a
By large I mean an application with intensive operations, such
as a fancy GUI maybe a couple of threads, accessing a
database, etc.
I can't say I've had any python related problems on such matters.
I've done some modestly large-sized apps, and the bottlenecks
are almost always I/O bound...disk, network, database (which is
regularly disk or network bound). Some stuff has done some
fairly intense computation, and it's usually an algorithmic
problem, not a python problem (in my case, it was an O(n^2)
comparison of every element in one list with every element in
another list to find a "closest" string match to try and gently
merge two datasets on merely a person's ill-formatted name).

I'm not sure I'd write a hard-core nuclear-explosion simulator or
render intense 3d graphics within python. But I'd readily use
python to glue together low-level optimized versions of libraries
such as OpenGL where performance counts...

-tkc


Nov 14 '06 #17

P: n/a
da****@gmail.com wrote:
By large I mean an application with intensive operations, such as a
fancy GUI maybe a couple of threads, accessing a database, etc.
I am still fairly new to Python, I only started using it at the start
of this year and then stopped for a while. However the project I
undertook at the start of the year built a system using the
technologies above, in addition it used SVG graphics, Jabber Instant
messaging and the windows API. All of these were built within threads
and used a client/server architecture. I have also built some small
wxPython based GUI's.

Overall I found Python ideal for the task, both in terms of development
time and reliability - although my knowledge of the Windows API was not
what it should have been (I mainly used Linux/Mac OS X user) so I
experienced a few problems. Also there was a lack of good online docs
about Python based Windows API calls.

You can interface to a few databases very easily including MySQL and
SQLite. I have been using the latter recently for my task and it works
very well. Also I have found that using Stackless Python drastically
improves the reliability of thread based applications. Also performance
"can" be substantially improved by using the Psyco library, although I
have know it to make things worse.

Overall my experience of Python was very positive and this was in no
small part due to the help I received from people here.

I hope this helps.

Best,

Rod

Nov 15 '06 #18

P: n/a
da****@gmail.com wrote:
By large I mean an application with intensive operations, such as a
fancy GUI maybe a couple of threads, accessing a database, etc.
Threads are handled by the OS. GUI are (usually) handled by a
lower-level lib like GTK or such. DB access mostly rely on the
particular RDBMS. So we're left with the application code itself - the
glue between all these componants. There's usually nothing really
"intensive" here, and I wouldn't bet using C++ instead of Python would
make a huge difference here - wrt/ perceived performances at least.

My 2 cents...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Nov 15 '06 #19

P: n/a
Yes of course python can handle of these things, but have you actually
compared them to something written in C? Even if the app was converted
into bytecode, it's still not as fast as an executable, that's all I am
saying.
Bruno Desthuilliers wrote:
da****@gmail.com wrote:
By large I mean an application with intensive operations, such as a
fancy GUI maybe a couple of threads, accessing a database, etc.

Threads are handled by the OS. GUI are (usually) handled by a
lower-level lib like GTK or such. DB access mostly rely on the
particular RDBMS. So we're left with the application code itself - the
glue between all these componants. There's usually nothing really
"intensive" here, and I wouldn't bet using C++ instead of Python would
make a huge difference here - wrt/ perceived performances at least.

My 2 cents...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Nov 16 '06 #20

P: n/a
I think Python is for you.

lennart wrote:
Can you define 'large'? Is that large in code, or large in database? I
don't know which database is supported. If its a external db, like
MySql, the query is performed through the software of MySql, am I
right? If I'm correct, the 'slowness' comes from the amount of code in
python itself, not from the database.
I'm afraid dakman's comment wasn't really very helpful.

Size is not a problem in itself. Ok, if the code modules are very
large, you will have a larger startup time, but this is probably
even worse in lower level languages such as C/C++. The python byte
code works at a higher level of abstraction than machine code, so
the byte code files are much more compact than corresponding
executable binaries from e.g. C/C++/Delphi.

The Python programming language, with its classes, modules,
packages etc is in my experience much better for writing large
applications without causing a mess than e.g. C++. It's much
easier to make a mess with C/C++'s "#include" than with Python's
"import". The lack of static typing means that some problems that
the compiler/linker would find in e.g. C++ development won't turn
up until you test your code in Python, but you'll get to testing
much faster with Python, and if you don't test well, you'll fail
with any larger development project however clever your compiler
and linker is.

Due to Python's very dynamic nature, there are a lot of operations
that will be much slower than in e.g. C or C++. For instance, if
you write "a = b + c" in C, the compiler knows at compile time what
types a, b and c are, and if they for example are ints, the addition
will be translated into a few very simple and quick machine code
instructions. In Python, the types typically won't be know until
runtime. This means that the objects need to be inspected during
execution to figure out what + means for these kinds of objects.
Python also handles memory allocation etc.

The consequence of this is that some kinds of programs that do
millions of trivial things, such as cryptography applications
where there are a lot of repeated multiplications and additions,
would be much, much slower in pure Python than in pure C. This
doesn't mean that Python is bad for a large group of applications.
It means that for a large group of applications, there are some
parts (for instance computationally intensive or e.g. interfacing
with some kind of devices or third party products) that should be
handled by extensions written in e.g. C.

Whatever you plan to do, it's likely that the extensions you need
already exists. There are such extensions for databases, networking,
maths, cryptography, XML parsing, etc etc. I'm a programmer working
with C, C++, Python, SQL etc, and despite 10 years of Python coding
I never actually needed to code any C extension myself yet. It's
very likely that you'll get away using 100% pure Python too. Note
that large parts of your programs will be C code, but C code you
didn't have to write yourself, and as far as your programming is
concerned it could as well have been Python, it's just that things
will run faster than if it had been pure Python...

Have fun!
Nov 17 '06 #21

P: n/a
Hi,

On Thu, 16 Nov 2006 10:22:57 -0800, "dakman wrote:
Yes of course python can handle of these things, but have you actually
compared them to something written in C? Even if the app was converted
into bytecode, it's still not as fast as an executable, that's all I am
saying.
I used to routinely write gui programs (data entry and such) in python
first and then ported them down to C for speed. I stopped the downporting,
isn't worth it, I just stay in python.

Make no mistake, python itself is slow enough. Its just that with today's
CPUs, no, even with CPUs 3 years old (mine is an Athlon XP), most
of the time slow is still faster than needed.

Once you start to do heavy-lifting in python, the picture becomes bleak,
though (I tried to write a Truetype Font Repacker
http://www.scratchpost.org/hacks/tru...font-repacker/ without using any
external font libraries and its dog slow).

That said, most programming (for me also at work) consists of glue code.

And there still is that python to C++ converter, what was it called?
And python for dotnet. And Jython.
Those should help with speed a bit.

cheers,
Danny
Nov 21 '06 #22

P: n/a
One resource you should always keep at hand is this extremely useful
Quick Reference:

http://rgruet.free.fr/PQR24/PQR2.4.html

Study it carefully, there is a lot in there that can teach you about
how Python works. Fire up IPython as well and start hacking!

2B

Nov 22 '06 #23

This discussion thread is closed

Replies have been disabled for this discussion.