Python and QT

This is a new forum that can be used to discuss anything that's not directly related to JPatch.

Python and QT

Postby sascha » Tue Jan 20, 2009 11:51 am

I'm still happy with Java, but I'm also keeping my eyes open for alternatives. The four things I'm expecting from a language/framework are object-orientation, a GUI framework, good performance (i.e. compilation to native code) and cross platform compatibility (Windows, Linux, OSX).

While Java does quite well in all 4 disciplines, Python with QT looks very interesting too. I think it eventually boils down to static vs. dynamic typechecking. With Java you'll get a rock solid OO-desing and bullet-proof classes, at the expense of a lot of boilerplate code (some of which a good IDE can handle, but it still makes code more difficult to read). With Python, you get rapid development, and about no boilerplate code at all - at the expense of the lack of compile time type checking, which means that you have to write test-code for about just everything.

Any experience with Python and/or QT? What do C++ or C# developers think about it?

Just to make that clear: I'm NOT going to rewrite JPatch in Python, don't worry. But, as far as JPatch is concerned, I'm considering using Jython (a Java Python interpreter/compiler) as a scripting language - perhaps for plugins, or for simple evaluators a user can provide (e.g. for constraints). Which has nothing to do with QT of course, I'm merely interested in the Python/QT combination for other projects.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: Python and QT

Postby pndragon » Tue Jan 20, 2009 8:43 pm

I mentioned elsewhere in this forum that I was endeavoring to learn Python (I haven't progressed any farther...my ninja monkeys won't give me any peace and I only get 2 or 3 hours sleep as it is) so this post intrigues me. Python/Jython seems to have a library for almost anything that you want to do and is not as arcane as perl...

--- Jim
"We're so sorry, Uncle Albert,
But we haven't done a bloody thing all day."
--- Paul McCartney
pndragon
 
Posts: 591
Joined: Sun Dec 05, 2004 1:27 am
Location: North Carolina

Re: Python and QT

Postby dcuny » Wed Jan 21, 2009 8:05 am

A week ago, I might have argued that wxWidgets was the direction to go. wxPython does a good job of wrapping the toolkit, and wxWidgets maps to a "native" library, instead of a "look-alike" like Qt.

That said, Qt has a lot going for it. It's probably stronger in the graphics and audio arena. Importantly, Qt was purchased by Nokia, who released Qt under the LGPL license. That's a real game changer for a lot of people. I saw a video preview of the IDE that's being developed for it, and it looks very nice.

C++ coders would complain about Qt using their own mocc pre-processor instead of the standard C++ way of doing things, but that was done because C++ hadn't yet standardized on those things when Qt was written. I haven't heard that complaint in years, so I don't know if it's still an issue. It never really was a major problem anyway.

Anyway, I've pretty much heard nothing but good things about the Qt toolkit. I actually spent a chunk of my vacation to Europe trying to track down the Programming with Qt book - it was first published in the Netherlands, where we were visiting - only to find it here at the local bookstore when I returned. My version of the book is way out of date, but even then it was clear that it was a nice library.

Python is also very nice language. Indentation has syntactical meaning, which drives a lot of people up the wall. They seem to worry about tabs being handled consistently (which is more an issue with makefiles). Personally, I think it's a great thing.

I don't know anything about the current state of Java/Python. There used to be a port called Jython, but I haven't kept track of it. I know there was a port to C# called IronPython. C# has a really nice language called boo that's also quite interesting, but that's getting off track.

I've never heard a C# developer talk about Qt. There are no doubt .NET bindings available, but Google didn't bring up anything pre-2005 in my quick search.

The only other scripting language that's got any real buzz other than Python is lua, and that's because it binds nicely to C and C++.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Python and QT

Postby pndragon » Thu Aug 05, 2010 3:55 pm

I am once more attempting to learn Python. I have crowded my monkeys back into their barrel (that was no fun!)

We talked once about getting the source code for version 0.4 . Is that a possibility at all?

I think that attempting to move the patch modeler into python/qt would teach me a lot while helping to preserve what i believe to be is a valuable resource: a free patch modeler

Jim
"We're so sorry, Uncle Albert,
But we haven't done a bloody thing all day."
--- Paul McCartney
pndragon
 
Posts: 591
Joined: Sun Dec 05, 2004 1:27 am
Location: North Carolina

Re: Python and QT

Postby sascha » Thu Aug 05, 2010 8:43 pm

We're currently visiting my in-laws and everything JPatch is at home at the PC. If it's not in the SVN I can zip the latest 0.4 sourcecode and upload it to the webserver - but not before August 12. Please remind me in case I forget :oops:
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria


Return to Off topic

Who is online

Users browsing this forum: No registered users and 3 guests

cron