Mailinglist Archive: opensuse (4054 mails)

< Previous Next >
Re: [SLE] Question for you programmers and those who onlye tinker w/ programming. RE Python and QT , esp in concert.
  • From: "Kai Ponte" <kai@xxxxxxxxxxxxxxxx>
  • Date: Tue, 24 Jan 2006 11:39:27 -0800
  • Message-id: <E1F1U0l-0007mK-Jo@xxxxxxxxxxxxxxx>


> Many times over I hear or see something like... "you should try foo,
> it's a really easy way to make your desktop dance to your tune" Be
sure
> you have Python AND QT installed ; and I believe, if memory serves ,
> the QT is something specifically tied to Python, or the other way
> around. Truth to say; I may not have the specifics on the Qt module
> because my brain is misfiring today.. <sigh> Migraines would be a
> heckova weapon if only they could harness it.

<snip>

Qt ( www.trolltech.com ) and Python ( www.python.org ) are both
programming languages. That is all they have in common. ( See the
history of programming here: http://www.oreilly.com/news/
languageposter_0504.html )

Python is a scripting language, which means it is not compiled, but runs
as part of an interpreter. Here's a "Hello World" script in Python:

print "Hello, world!"

You access a python script by using the command python then the script.
For example, "python ./mycoolscript.py" would run the mycoolscript
application. It is open source, which means there's no commercial
entity behind it. It is considered one of the "P" applications in the
LAMP stack - Linux, Apache, MySQL and Python/Perl/PHP - that you may
have heard of.

Qt is a C++ compiler and set of tools (called "widgets") from Tolltech
company in Norway. It is the language used to write KDE and Opera. (
ttp://en.wikipedia.org/wiki/Qt_(toolkit) ). Unlike Python, a Qt
applicaiton is compiled, which means it is turned from an English-like
syntax to a machine readable form. Here's a "Hello World" app in C++


#include <iostream>

int main()
{
std::cout << "Hello, world!\n";
}

Once compiled, you cannot directly edit a Qt application. (Don't get me
started with Resource Editors.) Unlike Python, Qt is not pure Open
Source. The company, Trolltech, is very much behind the OSS movement but
also needs to make money. This caused a major rift between the "purists"
and those who wanted a good desktop. Hence the reason the Gnome desktop
is written with GTK+, another C++ compiler which is completely open
source.

Now that you've had an eyeful, here's the answer to your question. Some
apps may need one or another library loaded to provide supporting
information. I typically load all Qt and Python (as well as GTK+)
libraries on my SUSE installation in order to ensure I can run
everything. Compared to my many gigs of MP3/OGG files and movies, the
libraries don't take up much space.

Typically speaking, the more eye-candy you want, the more libraries (or
widgets) you'll need.

HTH!

By the way, I remember from a univeristy Chemistry class that the best
cure for a migrane is a combination of apirin, acetaminophen and THC.
(You might have a hard time obtaining the THC depending on which country
you're in.)

--
kai ponte
www.perfectreign.com

<insert really offensive signature here>

< Previous Next >