Is python for me?

L

lennart

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!
 
C

Cameron Laird

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.
 
D

dakman

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 said:
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.
 
D

Dan Lenski

lennart said:
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
 
C

Carsten Haese

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.
 
L

lennart

Carsten Haese schreef:
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
 
L

lennart

(e-mail address removed) 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!

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.
 
S

Stephen Eilert

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:
 
C

Cameron Laird

.
.
.
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

Along with the <URL: http://docs.python.org/tut/ > I already sent you,
you can hardly do better than the Dutch-language page you mention above.
You might like <URL:
http://en.wikibooks.org/wiki/Non-Programmer's_Tutorial_for_Python/Contents >;
note that I recommend this as no insult to you, even though you already
are a programmer.
 
J

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
 
T

TiNo

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

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/pycon-python-ide-review.html
for a comparison of 4 ide's (including SPE)
 
D

Dan Lenski

Carsten said:
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
 
S

SPE - Stani's Python Editor

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
 
M

Mark Woodward

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,
 
S

Steve Holden

Mark said:
....

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
 
D

dakman

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

Tim Chase

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
 
R

rodmc

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
 
B

Bruno Desthuilliers

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...
 
D

dakman

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top