Newbie's rant's and question :) (long post)

H

Hendy Teguh

Hello,

first, a little warning, may contain negative comments, this is truly
my humble opinion, please consider it as a curious comments, not
flaming or trolling (there're tendency i read on newsgroup (especially
linux newsgroups), that newbie's opinion are often considered
trolling, especially from diehard fans :p ). And also since english
is not my native language, please forgive my bad english.

Ok, a little background. i learned some programming language before,
all DOS (QuickBASIC, Pascal and Assembly). But when VB 'boomed', i
stopped programming (i didn't really like the way of visual
programming). Lately i began to use linux and see that python is
widely use in almost everywhere, i started to learn python.

I've been learning python for about 2 or 3 months (not too seriously)
and i've been learning from a lot of online tutorials. So far i have
written 2 serious programs, one that remove certain attributes from
HTML tag, the other one auto-rename all images that a page use into
sequential order. All are done manually (read, parsed, edited and
wrote back). I think i pretty much grabbed the basic of python
language (although sometime still need to look for command reference).

1. I actually has a lot of idea of program that i want to write, but
since the 'basic' python has pretty much limitation in outputing
result (No GUI), so i think it's time for me to learn GUI extension.
After searching around, i finally decided to learn wxPython. I try to
follow the tutorial from the website, but it seemed that the tutorial
is written in mind that we have learned any GUI programming before. I
stopped on the middle of the tutorial since everything looks 'out of
control'. I (guess i) do know what the commands do, most question is
like 'where the heck does this command come from?' which lead to 'if i
want to do this, what should i do?'.

i tried to search for other wxPython tutorial, but it seems a little
scarce. i googled around and found out that many expert always
recommended to look for reference from the demo file and the help
file. So, i try to learn by myself. It took me nearly 30 minutes
'wreck havocing' the demo files and wxWindow reference just to find
the command to refresh the menu (which i've disabled). This is very -
very discouraging for me. Am i doing something wrong here or is this
the correct 'process' of learning GUI programming? I feel like
there're a lot of missing step from the 'basic' python tutorial to
'expert' python tutorial.

2. so far i learned python, i got the impression that python is more
like a scripting language than programming since python rely heavily
on external libraries (i may be biased on this because i also
currently learning Blender 3D which use python as the scripting
language). In other word, somehow python is 'teethless' in doing
something 'powerful' by itself IMHO.

I'm planning to write a simple graphic viewer in paralel learning GUI.
Since python don't support natively jpeg or png (am i right?), do i
need to find library to read those file or should i find the format of
each extension and decode with python by myself? if i can use library,
could anyone guide me where to find supporting library for python? (I
once every tried to google for zip handling library, found only zlib,
seems only handling ZIP compression not the zip file itself).

3. just a curious question, why doesn't python include a basic library
(GUI for example)? the library doesn't necessarily need to be
optimised, just to help introducing the way python work. An example
Pascal language, it included some library to handle graphic mode. Not
very optimised, but it really-really help me a lot in understanding
graphic mode. When i'm good enough and feel that it's very slow, i
could either search for better library or just programmed it myself
(in my case, i made a library from assembly). The point is that it
could really - really help the beginner to learn.


ok, end of my rants here :)

Best regards,


Hendy
 
P

Peter Hansen

Hendy said:
first, a little warning, may contain negative comments, this is truly
my humble opinion, please consider it as a curious comments, not
flaming or trolling (there're tendency i read on newsgroup (especially
linux newsgroups), that newbie's opinion are often considered
trolling, especially from diehard fans :p ).

Actually, newbie comments are considered trolling most commonly
only when they have been using Python for all of five minutes
(or sometimes two days) and they think they know exactly what
is wrong and how it should be "fixed". It would be hard to
consider your post a troll, especially since you are clearly not
presenting your position as absolute, but are merely expressing
unhappiness and confusion about your situation.
2. so far i learned python, i got the impression that python is more
like a scripting language than programming since python rely heavily
on external libraries ... In other word, somehow python is 'teethless'
> in doing something 'powerful' by itself IMHO.

You have a mistaken impression, I think, based on your relatively
limited experience. I know you don't know C, but you've doubtless
heard of it and would, I assume, consider it a "real" programming
language (whatever that is to you). Are you aware that C doesn't
even include *input and output* in the basic language definition?
This and almost everything else of interest is provided only by
external libraries.

Python (and Java, and many many other languages) is no different in
this respect. The fact that Python packages up so much of its overall
functionality in external libraries is really a strength, not a
weakness, allowing it to change more rapidly over time in response
to changes in its environment. Look at, for example, the wide
variety of third-party tools for handling XML. If you were limited
to just what was in the standard library you wouldn't as easily
be able to choose the right tool for the right job, if you had
special needs for example (e.g. performance, or low memory usage).
I'm planning to write a simple graphic viewer in paralel learning GUI.
Since python don't support natively jpeg or png (am i right?), do i
need to find library to read those file

Yes, this is what you should do. Few languages have only "native"
support for things like that (nor should they).
3. just a curious question, why doesn't python include a basic library
(GUI for example)?

It does! Tkinter is the standard Python GUI, included in the
regular download.

-Peter
 
S

SeeBelow

Hendy said:
Hello,

first, a little warning, may contain negative comments, this is truly
my humble opinion, please consider it as a curious comments, not
flaming or trolling (there're tendency i read on newsgroup (especially
linux newsgroups), that newbie's opinion are often considered
trolling, especially from diehard fans :p ). And also since english
is not my native language, please forgive my bad english.

Ok, a little background. i learned some programming language before,
all DOS (QuickBASIC, Pascal and Assembly). But when VB 'boomed', i
stopped programming (i didn't really like the way of visual
programming). Lately i began to use linux and see that python is
widely use in almost everywhere, i started to learn python.
<snip>

GUI programming is not easy when you have never done it, but I can
advise you how to learn it. First, use Tkinter instead of Wxpython, and
second go to
http://www.ferg.org/thinking_in_tkinter/index.html and download the file
thinking_in_tkinter.zip. Unzip this file and run the thinking.py
program. It will give you a series of lessons. After those lessons you
will be able to understand the Tkinter documentation that you can find
on the web; there is quite a bit. The URL above leads to several good
tutorials or references.

The reason the go with Tkinter instead of Wxpython is mainly that there
is more and better documentation available, which you need. But also
Tkinter is easier to use. If you are already an expert, then Wxpython
has more capabilities.

Mitchell Timin

--
"Many are stubborn in pursuit of the path they have chosen, few in
pursuit of the goal." - Friedrich Nietzsche

http://annevolve.sourceforge.net is what I'm into nowadays.
Humans may write to me at this address: zenguy at shaw dot ca
 
T

Tim Hoffman

Hi Hendy

Some things you should no. Python runs on many different OS's and as
such a single cross platform GUI is often quite difficult to
build/maintain and distribute. However Python does come with one in most
pre-build distributions (Tkinter) based on TK.

I am not sure what you mean by python is teethless. I use python every
day for serious programming and I almost never use/build stuff that
uses a GUI. (but then I suppose data manipulation and server oriented
programming just isn't that serious ;-)

By the way I don't think many languages have native support for JPEG's

Also does the fact that C# and Java, and C++ depend on so many external
libraries and classes (ie not part of the core) mean they are scripting
languages. I mean does C++ come with a GUI built in ;-)

If you want a good library for manipulating images try PIL.
If you want to start with a GUI, try TKinter that comes with Python
, it is probably much easier to get started with than wxWindows.

Oh and the zipfile class has been in Python since 1.6 I think.

I feel you really should spend a little more time reading the (IMHO)
quite good documentation that comes with Python, for the basics.

Regards

Tim
 
R

Ryan Paul

Hello,

first, a little warning, may contain negative comments, this is truly
my humble opinion, please consider it as a curious comments, not
flaming or trolling (there're tendency i read on newsgroup (especially
linux newsgroups), that newbie's opinion are often considered
trolling, especially from diehard fans :p ). And also since english
is not my native language, please forgive my bad english.

Ok, a little background. i learned some programming language before,
all DOS (QuickBASIC, Pascal and Assembly). But when VB 'boomed', i
stopped programming (i didn't really like the way of visual
programming). Lately i began to use linux and see that python is
widely use in almost everywhere, i started to learn python.

I've been learning python for about 2 or 3 months (not too seriously)
and i've been learning from a lot of online tutorials. So far i have
written 2 serious programs, one that remove certain attributes from
HTML tag, the other one auto-rename all images that a page use into
sequential order. All are done manually (read, parsed, edited and
wrote back). I think i pretty much grabbed the basic of python
language (although sometime still need to look for command reference).

1. I actually has a lot of idea of program that i want to write, but
since the 'basic' python has pretty much limitation in outputing
result (No GUI), so i think it's time for me to learn GUI extension.
After searching around, i finally decided to learn wxPython. I try to
follow the tutorial from the website, but it seemed that the tutorial
is written in mind that we have learned any GUI programming before. I
stopped on the middle of the tutorial since everything looks 'out of
control'. I (guess i) do know what the commands do, most question is
like 'where the heck does this command come from?' which lead to 'if i
want to do this, what should i do?'.

i tried to search for other wxPython tutorial, but it seems a little
scarce. i googled around and found out that many expert always
recommended to look for reference from the demo file and the help
file. So, i try to learn by myself. It took me nearly 30 minutes
'wreck havocing' the demo files and wxWindow reference just to find
the command to refresh the menu (which i've disabled). This is very -
very discouraging for me. Am i doing something wrong here or is this
the correct 'process' of learning GUI programming? I feel like
there're a lot of missing step from the 'basic' python tutorial to
'expert' python tutorial.

2. so far i learned python, i got the impression that python is more
like a scripting language than programming since python rely heavily
on external libraries (i may be biased on this because i also
currently learning Blender 3D which use python as the scripting
language). In other word, somehow python is 'teethless' in doing
something 'powerful' by itself IMHO.

I'm planning to write a simple graphic viewer in paralel learning GUI.
Since python don't support natively jpeg or png (am i right?), do i
need to find library to read those file or should i find the format of
each extension and decode with python by myself? if i can use library,
could anyone guide me where to find supporting library for python? (I
once every tried to google for zip handling library, found only zlib,
seems only handling ZIP compression not the zip file itself).

3. just a curious question, why doesn't python include a basic library
(GUI for example)? the library doesn't necessarily need to be
optimised, just to help introducing the way python work. An example
Pascal language, it included some library to handle graphic mode. Not
very optimised, but it really-really help me a lot in understanding
graphic mode. When i'm good enough and feel that it's very slow, i
could either search for better library or just programmed it myself
(in my case, i made a library from assembly). The point is that it
could really - really help the beginner to learn.


ok, end of my rants here :)

Best regards,


Hendy

looks like everybody else covered your GUI lib questions pretty well. I'll
comment on your comment that python lacks teeth. ;-)

Python has a simple, consistent syntax that facilitates rapid development
of relatively powerful applications. Because it is an interpreted
language, an algorithm implemented in pure python will always be slower
than one implemented in a language like C that can produce native
executables. Use of external libraries nullifies this problem. I start by
writing my programs in python, and when I find functions or components
that are lagging considerably, I rewrite them in OCaml or C, and make a
python interface for them. In all honesty, I dont find that I have to do
it very often. Python is very fast, even though it is interpreted. In most
tests, you will find that python runtime speed is significantly better
than Java's, and python also seems to use less memory than java. As far as
I can tell, python has very nice teeth! Python challenges the the
distinction between a 'scripting' language and a 'programming' language.
It has the capacity to be whatever you need it to be. It is well suited
for writing simple shell scripts (tho I typically prefer Ruby for shell
scripts), and it is equally well suited for writing large scale programs.
The ease with which external C and Ocaml libraries can be used and wrapped
adds a lot of power to python.

Good luck!
--SegPhault
 
T

Terry Reedy

Hendy Teguh said:
Hello,

first, a little warning, may contain negative comments,

If something is so negative as to really need a warning, perhaps a rewrite
is in order.
my humble opinion, please consider it as a curious comments, not
flaming or trolling

Perhaps half the people who say "I am not a troll" are (a troll), like the
home-improvement salesperson who came by my house a week ago looking for
someone who could be conned into signing for a 40% premium without getting
competitive bids ;-). So maybe better to just ask your questions and leave
the subject alone.

(there're tendency i read on newsgroup (especially
linux newsgroups), that newbie's opinion are often considered
trolling, especially from diehard fans :p ).

Trolling is a type of fishing with a moving, typically spinning, lure. A
troll is a (mythical) humanoid underground wanderer. (Both from the same
root.) A newsgroup troll (not mythical) fishes for controversy and
emotional reaction, with purposes that lie underneath surface appearances.
Sometimes the difference between that and honest questioning and
opinionating is rather subtle, especially to those less experienced with
newsgroups and the particular language. There are some over-reactions, but
folks here on c.l.py are pretty tolerant and slow to accuse.
And also since english
is not my native language, please forgive my bad english.

Python's community, founded by a Dutchman, is quite international, with
numerous people posting in English as a second (or third, or whatever)
language. Your 'bad english' is no worse than that of some Americans and
without your 'apology', I might not have noticed it as non-native.
Ok, a little background.

This was quite helpful for understanding what followed.
After searching around, i finally decided to learn wxPython.

wxPython, like many things built on top of Python, is otherwise an
independent project with its own website (on SourceForge) and mailing list.
If you continue with it, intermediate to advanced questions are better
posted to its lists.
language). In other word, somehow python is 'teethless' in doing
something 'powerful' by itself IMHO.

The fact that saber-toothed cats had fewer teeth than crocodiles hardly
made them toothless. Two of Python's 'big teeth' are, in my opinion, the
builtin list and dict types.

Terry J. Reedy
 

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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top