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

Ryan Paul segphault at sbcglobal.net
Fri May 21 10:08:54 EDT 2004


On Thu, 20 May 2004 12:34:14 -0700, Hendy Teguh wrote:

> 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




More information about the Python-list mailing list