1 |
On Mon, 2004-03-22 at 22:58, Tom Wesley wrote: |
2 |
> This discussion seems to be leading towards the use of scripting (?) languages |
3 |
> like Python and Perl, and more mentions of Python than anything else. I have |
4 |
> to say that I like the idea of this, least of all because it will give me |
5 |
> some ability to comment on portage and other Gentoo specifics. |
6 |
> I like this idea, as for some reason it sounds less of a large slope to climb. |
7 |
> If/when I get there, what are the GTK+2 and QT bindings like for Python? I'm |
8 |
> mainly concerned about the speed and how similar it is to using C/C++ - it's |
9 |
> quite probable that I'll want to learn either eventually. |
10 |
|
11 |
GTK+-2.x Python bindings (PyGTK[1][2]) and Qt 3.x Python bindings |
12 |
(PyQT[3]) mostly just wrap around the C (for gtk+) and C++ (for Qt) |
13 |
library with an extension, thus actually the speed loss isn't too |
14 |
signifact. For example in the world of wxWidgets[4] many people first |
15 |
write the application in wxPython[5] first as the GUI can be written |
16 |
quickly, easilly changed, no need to waste time on compiling, etc. Often |
17 |
it stays in python too. The skeletal is done in python so to say. |
18 |
|
19 |
The API function names are kept as close as possible to the C/C++ |
20 |
couterpart so later doing it directly in C/C++ shouldn't be too hard |
21 |
once you have the basics and have memorized the function names. Less |
22 |
often need to look into the reference you keep under your pillow ;) |
23 |
Often there are multiple functions in python for one function in C/C++, |
24 |
that's because python doesn't know about function overloading. |
25 |
|
26 |
Personally I started with BASIC, then Pascal, then took on C and C++. |
27 |
And the more high-level the more I like it, thus I don't do low-level C |
28 |
coding, only when I have to :P |
29 |
Python is a very good language with which to start serious programming. |
30 |
No need to worry about declaring variables, you learn doing identation |
31 |
right due to the language, you can program interactively, you have the |
32 |
help system right there build in, and so on. |
33 |
|
34 |
References: |
35 |
1. http://www.daa.com.au/~james/pygtk/ |
36 |
2. http://www.pygtk.org/ |
37 |
3. http://www.riverbankcomputing.co.uk/pyqt/ |
38 |
4. http://www.wxwidgets.org/ |
39 |
5. http://www.wxpython.org/ |
40 |
|
41 |
-- |
42 |
With regards, |
43 |
Mart Raudsepp |
44 |
|
45 |
Project manager of wxMUD |
46 |
E-mail: leio@××××××××.net |
47 |
http://wxmud.sourceforge.net/ |
48 |
|
49 |
|
50 |
|
51 |
-- |
52 |
gentoo-dev@g.o mailing list |