I am used to making android applications and I would like to also make desktop applications. I would prefer to use Python. Is there a module that allows relative layout to better fit all monitors? I have tried pyside, but I could only get absolute. I saw the Kivy module as well, but I didn't want to devote a lot of time to it if it isn't what I need. I am developing on a windows platform for windows, but plan to possibly port it to linux and mac as well. I also would prefer to use Python 3.
I would personally recommend Tkinter. It works on Windows, Linux, and Mac, and is simple enough such that you can pick it up in a weekend. There is plenty of support and documentation as well.
Consider wxPython as well--it would satisfy your needs.
Related
I'm trying to find out if I can write python-based windows desktop widgets using python 3.2.2 or higher for windows. The above projects are thoroughly confusing. Do any of them support what I'm looking for? (i.e. can be used with windows and python 3.2.2 and higher?
I did come across this answer (https://askubuntu.com/questions/97023/why-cant-i-import-pygtk-with-python-3-2-from-pydev) but it looks like it only works for non-windows platform.
If non of these above python-projects will work with windows and python 3.2.2, is there an easier way to create rainmeter-like desktop widgets in python 3.2.2 or higher for windows?
To start with the confusion: Gtk is the GIMP toolkit, and all the different things you mention in your question title are related, but not quite the same. PyGTK is the legacy binding between Python and GTK, and PyGObject is the preferred binding if you go down that road.
Here a nice short overview of all the different GUI options for Python development, that should explain those terms briefly so that you have an overview. And as gauden suggested in the comments, wxPython is a very common road for cross-platform applications.
Nowadays you should at least consider Kivy as well, it is fun to program in, and it even gives you options to expand the "cross-platform" bit to mobile devices. It supports transparency (or opacity in Kivy terms)
We are designing open source UI controller application for Plone CMS. The application itself would be just simple start/stop dialog window for Plone daemon process, mainly aimed for Windows users.
However we are hoping to use the same app for OSX and Linux.
We can create the code for Python Qt application, but we feel unsure about the deployment process. In the optimal case we'd hope to create static builds (.exe for Windows, .dmg for OSX) all megabyte so Qt included for our tiny Python script, just to maximize the ease for the end user.
Are there any examples, scripts, etc. to build Qt friendly installers cross-platform? What other best practices we should consider?
PyInstaller is a nice one to create executables and it comes with full PyQt support. It says it can create executables for Windows, OsX and Linux but I've never used it for anything other than Windows. For Windows, it was quite painless and easy.
This doesn't address the packaging/deployment component of your question, but might be a useful side note.... If you haven't already, you may want to consider PySide for your Python bindings, instead of PyQt. The licensing terms are more permissive (LGPL) than PyQt, and may be more appropriate unless you're commercially licensed.
FWIW, I have successfully used py2app with PySide/Qt4 on the Mac, but don't know if it goes cross platform.
I am making programs that solve and show work for math problems. I would like to add a GUI, and I think wxPython will be best. If I use wxPython for the GUI, will the end user need wxPython on their computer in order to use the program with the GUI? If not, what would should I use?
These apps will be used on mostly Windows, but I would also like them to work on Macs and Linux. I'm not for sure if any Python GUI elements will work on Android through SL4A, but if you know any, that would be appreciated.
Also, I know Tkinter is bundled with Python, but is it a dying technique, as I have read?
Thanks!
There are tools for packaging a python program and its libraries into an executable that can run on its own. I keep this list handy:
http://www.freehackers.org/Packaging_a_python_program
I'm sure at least one of those tools will handle wxPython, because I did it a few years ago. (Sorry, but I don't remember which one.)
Yes, tkinter's popularity has been waning for years. See this question for some more options:
higher level Python GUI toolkit, e.g. pass dict for TreeView/Grid
If your software is mostly about the complicated processing, with a fairly simple UI, tkinter is probably fine
I am using cx_freeze for this without any problems. Worked for me on Windows and Linux.
Tkinter comes with Python, so it can be handier in some respects just because of that. On the other hand, wxPython uses the native widgets of the OS (which has it's own set of pros and cons). I personally prefer wxPython. But no, Tkinter is not dead to my knowledge.
You can use py2exe to bundle up your app on Windows or you could use cx_freeze or bb_freeze. There's also PyInstaller, which I think can create some kind of Linux bundle, but the docs are kind of confusing. For Mac, see py2app.
I'm not aware of any specific Python GUI toolkits for Android.
PyInstaller.
install and run.
cmd -> python pyinstaller.py NAMEOFSCRIPT.py --onefile --noconsole.
easy as 123.
Features needed:
A framework, allowing me to build tab-based application with custom design (like in Hotot twitter client), keeping the native os window frame.
Compatible with Python.
My application will be running under Win/OsX/Linux/.
No Flash/Flex/AIR.
I also would like to ask if PySide does meet my requirements and is it worse or better than wxPython and Tkinter mentioned already?
Use Tkinter. It works on every platform that Python supports, is relatively easy to program in, looks pretty good on most platforms, and has the features you want. It's also built-in for most versions of Python, so your users (in many cases) will not have to install any external dependencies.
I find that Tkinter looks best on Mac OSX and Windows, and slightly outdated on some Gnome desktops. The most important feature, however, is that the API is extremely clean and easy to use and it is very lightweight. PyQt has a similar feature set, but, in my experience, its performance is significantly degraded when compared to Tkinter.
PySide is Nokia's Qt binding for Python. I'm not aware of what the differences are between it and PyQt. Ultimately, most GUI toolkits for Python are going to be cross platform and support the functionality you need. I suggest Tkinter because I feel it is the easiest and most pleasurable way to program GUI applications in Python.
I am the author of Hotot.
according to your requirements, the key for you to choose a framework is the UI framework should be able to access webview conveniently.
Hotot has several wrappers for different platforms. On Linux, we have both Qt and GTK version, on Windows, we provide a Qt version, on Mac, we have a Cocoa version, and of course we have a Chrome version. In a word, all they can easily access webkit.
PS: XULRunner is another good choice for native appearance.
Additionally to the advices given by other people, I suggest you to use PyQt which is a Python binding to Qt framework. It's widely used, cross-platform and feature-full.
Take a look at wxPython (based on wxWidgets). If you want to make it web-based, look into using Django.
Well, you mentioned PyHotOt, and it says (on its web site) that it uses pywebkitgtk, and PyGTK. PyGTK/PyWebKitGTK exists for windows. Did you check it out? I think OS X would be the weak link on GTK, but maybe it's pretty good too.
I've been using WxPython and I've tried Tk, but it seems that, while both are good and I'll likely use them for other projects, neither of those appear to be capable of accomplishing the things that I want for my current project (which is fine, they're good at what they do).
Basically what I'm looking for is something that will allow me to make rich graphical GUIs. My specific goal is a window that will draw bitmap buttons, resize the parent window automatically to fit them, and possibly animate the resize with a slide effect and have the buttons fade in. Also being able to have my own window border style instead of the inbuilt one is important to me.
This particular project will be Windows only, so non-portable libraries are fine in this case, though portable ones would be great too.
If I missed how this can be done in either WxPython or Tk, I'm all ears.
PySide: http://www.pyside.org/
The PySide project provides
LGPL-licensed Python bindings for the
Qt cross-platform application and UI
framework. PySide Qt bindings allow
both free open source and proprietary
software development and ultimately
aim to support all of the platforms as
Qt itself.
The Windows version of PySide is quite new and may be considered as a beta version. PySide is API compatible with PyQt.
How about PyQt?
http://www.riverbankcomputing.co.uk/software/pyqt/intro
Just sharing my opinion: Kivy.
Innovative open-source library. Supports both 2.x and 3.x versions of Python.
Kivy - Open source Python library for rapid development of applications
that make use of innovative user interfaces, such as multi-touch apps.
Kivy is based on OpenGL ES 2 and includes native multi-touch for each platform and Android/iOS. It’s an event-driven framework based around a main loop, and is thus also suitable for game development.
Try Pyglet. Its a library for python that makes using OpenGL very easy. You can draw pretty good 2d interfaces using Quads.
I can't tell you what is best because that is subjective but I can give you another option: PyGTK
PyGTK lets you to easily create programs with a graphical user interface using the Python programming language. The underlying GTK+ library provides all kind of visual elements and utilities for it and, if needed, you can develop full featured applications for the GNOME Desktop.
PyGTK applications are truly multiplatform and they're able to run, unmodified, on Linux, Windows, MacOS X and other platforms.