Domain: riverbankcomputing.co.uk
Stories and comments across the archive that link to riverbankcomputing.co.uk.
Comments · 41
-
Qt-based development
What options does this leave for Qt-based development on embedded platforms?
Maemo on the N900 felt like the right direction with Nokia backing Qt, especially with projects like PySide created soley to offer a LGPL-licensed Python wrapper available to commercial developers (as opposed to PyQt). This permitted a single codebase to target desktop and mobile/tablet environments using a pleasant and completely open toolchain. MeeGo was set to carry on with Qt/X11.
But according to MeeGo's updated website, "We believe the future belongs to HTML5-based applications, outside of a relatively small percentage of apps, and we are firmly convinced that our investment needs to shift toward HTML5." -
Re:We've had it for years. It's called Qt.
If C++ is really too fucking hard for you, you could always use the PyQt Python bindings, or the Ruby bindings.
If you really feel it's necessary to use XML to lay out your UIs, you can always create XML files using the same format as Qt Designer.
And you don't need to use HTTP for every possible network communication. Jesus, is that the only protocol that you idiots know?
-
Re:Kudos to Nokia
"Not if you want to write commercial software on top of it, which is what Nokia wants to enable. Just as they did with releasing Qt under the LGPL."
Bullshit. PyQT also has a commercial license. You're just being a freeloading leech right now.
-
Re:Kudos to NokiaThe free version is licensed under the GPL. However, if you're complying with Qt's licenses, you have to pay to get the commercial PyQt to get a similarly licensed product. See http://www.riverbankcomputing.co.uk/software/pyqt/license. There are many open source licenses, and having a product that relies on a library have _different_ licenses than that same library unless one pays for it is not the open way.
Cheers
E
-
Re:Kudos to Nokia
If you cannot get the source to open-source, open-source the source.
PyQt is open source. Or isn't the GPL considered open anymore?
-
Re:I wonder about this
Qt absolutely has bindings in other languages. For example, check out PyQt: http://www.riverbankcomputing.co.uk/news
-
Re:Use Qt....
The argument is pretty moot when you consider PyQT [riverbankcomputing.co.uk], QtRuby [kde.org].
Have you looked closely at either one of those, especially the way they handle Qt signats/slots? Here are PyQt docs. Highlights:
Qt signals are statically defined as part of a C++ class. They are referenced using the QtCore.SIGNAL() function. This method takes a single string argument that is the name of the signal and its C++ signature. For example:
QtCore.SIGNAL("finished(int)")
...
Qt slots are statically defined as part of a C++ class. They are referenced using the QtCore.SLOT() function. This method takes a single string argument that is the name of the slot and its C++ signature.
QtCore.SLOT("done(int)")
...
Many of Qt's features make use of its meta-object system. In order to make use of these features from Python it is sometimes necessary to make certain Python objects (i.e. QObject sub-classes, properties and methods) appear as C++ objects. In particular it is sometimes necessary to define a C++ function signature that a Python method emulates
...@QtCore.pyqtSignature("int, char *")
def foo(self, arg1, arg2): ...So you have to deal with C++ function signatures while coding in Python - great.
For QtRuby, the situation is exactly the same. I won't go into details, but here's just one example from the docs:
Qt::Object.connect(@colormenu, SIGNAL("activated(int)"), self, SLOT("slotColorMenu(int)"))
It should be noted that QtRuby docs say that "future version of QtRuby will allow Ruby type signatures instead". However, that phrase was already in documentation first time I've seen QtRuby, which was, I believe, about 3 years ago. So far nothing's changed.
And here's how signals are dealt with in PyGtk, for comparison:
def hello_clicked(widget, data):
...
button_hello.connect("clicked", hello_clicked, None) -
Re:Use Qt....
In general, it is much harder to access C++ APIs from various high-level languages with FFI (Python, Ruby etc) then it is to access a C API.
I don't think that's an argument for Gtk+ vs. Qt as it is an argument for C vs. C++.
The argument is pretty moot when you consider PyQT, QtRuby. The only problem with C++ is name mangling. This can be solved with a pretty simple extern "C" call. -
Re:clone or unique, but not both
PyQt then if you use python. Works well for me, but I actually don't see a whole lot of advantages of using Python over C++ with Qt. http://www.riverbankcomputing.co.uk/software/pyqt/download
Not saying that you should switch to Qt, just pointing out the options.
-
Re:Wow, great news
PyQT is made by another company, http://www.riverbankcomputing.co.uk/ and is still under the same license as the old QT. It remains to be seen whether or not they will change license now that QT itself has. They did change there windows licensing when QT did, so there is hope.
-
Re:Qt still has a point?
Just off the top of my head, I would guess QScintilla can. Havn't checked tho.
-
Re:I stopped caring about QtOn Windows the best development tools are moving away from C++.
You don't have to use C++, you know. There's PyQt, for example. -
Re:Now for usability...
Well Java language bindings are officially supported: http://trolltech.com/products/qt/jambi
Also python is very well maintained: http://www.riverbankcomputing.co.uk/pyqt/
And you can do a lot of scripting with QtScript. -
Re:TCL/TK runs speech researchThe one thing that appeals to me about TK is the Canvas widget, which was apparently inspired by someone's Scheme graphics or some such thing. No worrying about paint messages and invalid regions -- you just give the Canvas a scene graph of line, text, even 3-color bitmap or even overlaying buttons, and the Canvas takes care of all of that. I would like to see such a high-function widget in other environements. QGraphicsView is available as part of PyQt4 and it's lovely to use from within Python. I've tried it with all sorts of complex canvas items (rich text, SVG etc) and it works great.
-
Re:portable gui
I'm sure you've come across PyQt so I guess it doesn't fit your needs either, but I thought I'd mention it anyway. Qt is a great GUI toolkit and has the native look and feel of the platforms it runs on.
-
Re:portable gui
I happen to use Linux, OSX and Windows, and the number one annoyance for me is a lack of clear "native-looking" GUI
QT with python bindings PyQt will give you native looking GUI on all three platforms you are interested i.e windows, linux and OSX. Now QT4 is available as GPL even on windows, so its truly "free". QT also comes with QT-designer which IMHO is the best rapid GUI designer app. -
Re:portable gui
-
Re:gui and native code - bad combination
What I sometimes do is write the performance-critical parts of my program in a low-level language, usually C or C++, and bind it with Python, and have pyGTK or pyWidgets for the GUI. It gets messy handling two languages, but doing a GUI in a high-level language like Python hugely reduces GUI development time. It can also be a little boring, if not tedious, to mix C++ and Python too...
Check out PyQT.
-
Re:Someday OSS developers will learn
And PyQt http://www.riverbankcomputing.co.uk/pyqt/ http://www.diotavelli.net/PyQtWiki is the Python wrapper. There is a book http://www.valdyas.org/python/book.html that is quite good.
-
Sure.
I believe PyQt will let you render widgets into an OpenGL context without complaint. OpenGL is but one of the rendering backends that it supports. At any rate, you might want to ask on the PyQt mailing-list; people there are exceedingly competent.
Hope this helps, and have fun! -
Sure.
I believe PyQt will let you render widgets into an OpenGL context without complaint. OpenGL is but one of the rendering backends that it supports. At any rate, you might want to ask on the PyQt mailing-list; people there are exceedingly competent.
Hope this helps, and have fun! -
Re:About time
Another (imho pretty good) alternative, PyQT.
Using the QT widgets it's cross platform (Linux, BSD, Windows, others?) and pretty fast :) -
PyQT bindingsNot the answer to your quest for an IDE, but...
If you want a cross-platform GUI library for Python you should consider PyQT which would allow you to run your python gui programs acrosss multiple platforms. QT licensing is not to everyone's taste as it seems to force you to either be totally GPL or buy a full commercial license.
-
Re:Is this the same wind river that maintains
PyQT and PyKDE bindings?
I think you mean Riverbank. -
An alternative approach: PyQtFirst of all, my warmest regards to the gamba team. And I wish them all the success.
But I thought I should point out that there is a beautifull platfrom for cross-platftorm RAD. This is PyQt, used in conjunction with Qt Designer. It combines the power of Qt as a GUI dev platform, with the power, extendability and simplicity of Python. I think that gambas aims at a simpler approach though, so I am not saying that it is useless. What I am saying is, if you need a very powerfull yet simple RAD with graphical capabilities, maybe you would like to consider QtDesinger + PyQt. It also has the advantage that is a really mature platform.
Cheers !
-
Re:Supprised
From the little I have seen, python seems to be a command line language. Is it anywhere similar to Visual Basic, which I have come to see and experience through a GUI?
And if you like KDE, checkout PyQt.
Check out tkinter and wxPython. -
Re:Why should "cross platform" always mean Java/.NThis is pure ignorance. The differences between programming languages and scripting languages are completely in the eyes of the developer. Python has excellent tools for developing solid applications which perform well and make use of libraries normally associate with C/C++ applications:
- A large standard library that rivals "programming" languages like Java
- Hooks into popular interface libraries
- for developing GUI applications
- A JIT optimizing compiler for speeding up interpreted bytecode to near-directly compiled code speeds
- Great support for regression/unit testing by allowing "main" functions to be used in every script/class file in large projects
In short, Python can do pretty much anything Java or Mono is likely able to do. In addition, it's faster and easier to code in than most "programming" languages, largely due to dynamic variable typing.
For developer friendliness Mono and Java are a step up from C/C++, but languages like Python (and probably Ruby, though I haven't used it) have potential to be even more.
-
It's British, Right?
If the poor thing was built or designed in England, I'd bet my house that the problem is a leak of some sort.
Cars, baby bottles, hell, even programming libraries from England leak! -
Re:Sounds like I need it.Python has some nice bindings, and what better to go with a crossplatform toolkit than a cross platform interpreted language. Also, SIP (the tool used to create the bindings) finally works under OS X.
A downside to QT is that it is not free under windows. While this might be okay with companies, if you ever considered writing crossplatform OSS programs, this can hamper things. There is a project porting the X11 version to windows, so its not a complete roadblock..
Of course there is always GTK which has been known to also run under windows and OS X. It is not my intention to start any flamewars -- I am just pointing out that for those in favour of either toolkit there is plenty of crossplatformability.
If either TK holds any major advantage its that GTK+ natively supports C code, but also has C++ bindings. The signalmm library that came out of gtkmm is actually really nice, and usable for other projects. However, in that case don't forget about boost, which also contains a signal library, not to mention a *really* nice interface to python (which I'm currently using in a project). Just be warned, you need a fast computer for compiling.
-
Re:Let Me Get This Straight
such as JDBC drivers, XML parsers, SOAP tools and 3rd party components
Semi-check, built-in, check, and check (including a lot of real winners, particularly including multiple cross-platform GUIs).
(The semi-check is because I'm not 100% certain the python modules match the JDBC completely.)
The only advantage Java offers is when it has an actual library that you can't get in Python (or likely anywhere else); capability for capability the languages and libraries are pretty close to the same. I mean, we have "Web Application Servers" for Python (like Zope), but maybe you absolutely need some Java thing for some other reason. There's no one language that meets all needs. But there's no reason Python can't be used in very large scale projects successfully, as evidenced by the fact that it has been so used.
Personally, I'd much rather use Python for the larger scale projects since for a variety of reasons I think it scales better then Java; Java projects IMHO survive because they get a lot more resources thrown at them, not because the language does very much to hold large projects together. But that's just my opinion.
(Oh, and Jython, though I know it's been mentioned elsewhere.) -
Re:Really? Infamous?
-
Re:Qt / GTK
It is, all by itself, a compelling reason to learn C++ if you don't already know it.
And even if you for some reason want to avoid C++, there's a good chance that you'll be able to use it. I spend my days coding a QT application in Python using PyQT.
I have, on occasion, had to read a couple of lines of C++ code (in the rare case when the QT documentation lacks some detail), but never needed to produce a single line of C++ myself. -
Since that wasn't answered...
Hello uradu,
Since you didn't get an answer about that, I think I'll point out that there's no 'real' compiler for Python -- they just package the interpreter and the bytecode together, as you supposed. Which is a good thing for deploying stuff on Windows, mind.
However, there -is- a JIT compiler for Python, which is called psycho, and it works really well (basically, just "import psycho" and then "psycho.full()" at the beginning of your program, and poof, it works). Some operations get speeded up drastically.
Also, if you're not targetting Windows primarily, you may want to try Qt 3 with PyQt. I found that you'll often need from 20% to 50% less code with Qt (thanks to its great API), and Qt Designer is a darn great GUI editor, too. You'll probably want to use the Eric IDE, which comes with the best Python debugger you'll find. (If you're targetting Windows as well, only Qt 2 is available there for free, and in some case it requires a tiny bit more code -- so if you've already invested some time learning wxPython it might not be worth switching.)
I've ended up dropping wxPython, personally, so I can't help you much with it, but if you need hints, help, etc, with Qt and PyQt, please feel free to drop me a line at balinares -at- ierne -dot- eu -dot- org. -
Re:Python on the Zaurus
Python is available for the regular Zuarus OS as well.
-
Re:hogwash.
There is also wxPython, letting you use wxWindows in Python.
This is not an advantage for wxWindows, as Qt has PyQt, letting you use Qt in Python. -
Re:Regex Learning Tool
There is a somewhat similar tool available for python users: kodos. I've found it very useful myself. It requires PyQt (see also Mandrake, RedHat and Suse PyQt packages available here).
-
Re:ANOTHER scripting language?
Well, there kind of already are - there are python bindings (PyQT) for, oh, everything really, and doubtless perl and ruby bindings too. You need an interpreter for whichever of these languages you want to run, and you need the relevant packages, plus ideally some documentation and you're ready to go.
Having said that, I think ECMA-script is a good base for scripting functionality - I've thought for a while that it's just too good to spend its whole life servicing pop-ups and roll-overs, and it's good to see that SVG, for instance, will eventually be scriptable via ECMA-script and the DOM. I've used JScript, MS's ECMA-script implementation, with the Windows Scripting Control before now to script the behaviour of COM components, and found it greatly preferable to VBScript - much more dynamic, much better error handling (try...catch...finally, with objects throwable as exceptions), much better array-handling and so on. I haven't tried using it for a larger-scale project, and would probably resort to Python if I wanted to build a full-blown application, but for quick and dirty scripting it's a real gem.
-
Try Python and PyQT
I am graduate student, and as a part of my masters thesis, I am involved in the development of a behaviral modeling environment . We are using the programing language python, and the GUI toolkit QT and PyQT. The choice of these technologies has made our tool fairly generic as it runs without a glitch on Linux, Solaris and win2k. We have not tested it on other platforms but it should work on all the platforms which run python. Python is a really cool programing language and PyQT makes cross-platform GUI development really easy. We have developed fairly involved GUIs using PyQT, like a Topology Editor, Schematic Editor (to capture the design and topology of circuits) etc. I would strongly recommend python and PyQt to someone interested in developing cross-platform applications (with GUIs)
-
Try Python and PyQT
I am graduate student, and as a part of my masters thesis, I am involved in the development of a behaviral modeling environment . We are using the programing language python, and the GUI toolkit QT and PyQT. The choice of these technologies has made our tool fairly generic as it runs without a glitch on Linux, Solaris and win2k. We have not tested it on other platforms but it should work on all the platforms which run python. Python is a really cool programing language and PyQT makes cross-platform GUI development really easy. We have developed fairly involved GUIs using PyQT, like a Topology Editor, Schematic Editor (to capture the design and topology of circuits) etc. I would strongly recommend python and PyQt to someone interested in developing cross-platform applications (with GUIs)
-
Other cool stuff for Zaurus - e.g., PythonThanks to the folks at Riverbank Computing you can download a Python interpreter that runs on the ARM and Linux based Sharp Zaurus PDA; Riverbank's web site is the place to go for this download. There are also downloads for many Python libraries for the ARM.
Having splurged and bought my first -ever PDA, a Zaurus, I am quite pleased. I am runing many of my own personal Python scripts on the Zaurus, from the BASH shell command line terminal program provided. I have discussed this with many folks who own or are considering buying a Zaurus, at the Zaurus home page at www.zaurusone.com and several of them have also taken an interest and are trying out Python programs on the Zaurus.
I recently read an interview with Guido van Rossum (I think it was in Linux Journal) where Guido commented that programming for PDA's or handhled computers might be one of the brightest spots in Python's future.
I am intrigued by this. The Zaurus' command line BASH shell, combined with the built-in keyboard is great for this purpose. I don't think that a command line without a built in keyboard would be nearly as good for this purpose; I need the keyboard for entering data and such, and the Zaurus' keyboard is almost as good as a real keyboard for me, to my surprise; it feels natural.
Does anyone know if the Compaq IPAQ and PALM devices have command line interfaces? I guess they must , since I believe I have read about Python ports to both the Windows CE and the PALM operating systems. Still, with its thumboard, the Zaurus is pretty hard to beat (The Zaurus also features an online "keyboard,", a "pickBoard", and handwriting recognition, but the thumboard makes the Zaurus pretty hard to beat.
The Zaurus also comes with a built-in JEDOE JVM in order to make porting Java programs easy, and to make developing new Java bsed code for the Zaurus easy.Also, the Zaurus has its native QT-based Qtopia environment.
I am trying to learn PyQt and Black Adder to make GUI programs for the Zaurus (although I don't know if or how hard it would be to port PyQt to the machine?) But even on the command line, Python shines in my opinion.
So, if anyone is looking for new realms to conquer with their Python skills, I heartily recommend the Sharp Zaurus.
-
Re:Develop in Python, using wxWindows
I can pretty much guarantee that you will be more productive and have your product out the door faster, event if you need to ramp up on both Python and wxWindows.
I agree halfway with you.
I can pretty much guarantee that you will be more productive and have your product out the door faster, event if you need to ramp up on both Python and Qt
Lots more information at:
PyQt