I'm interested in making desktop widgets, similar to Apple's Dashboard or what Vista has. I'd like to make them cross-platform, if possible. Opera's widgets are cross-platform but require the user to have Opera installed, so that's a big limitation.
I know most widgets are made with HTML/XML, CSS, and Javascript. Is there a way to create them using Python?
Update: I did find a site talking about Pyjamas. Does anyone have experience with it and, if so, what are its capabilities/limitations?
You should take a look at what the guys at Digsby are doing. Basically, they've written a port of WebKit to wxWidgets, and then use WebKit to render the interface, and wxPython for writing the rest of the app. Pretty neat, but very alpha at the moment.
Take a look at gDesklets. AFAIK they're UNIX only, but mabybe porting them to other platforms make more sense than starting from scratch?
They use python to create widgets (desklets).
Screenlets is designed for this task.
The Screenlets project is both a Python framework to simplify writing Cairo-drawn desktop widgets, similar to those found in the "Dashboard" feature of OS:X.
Widgets can be written entirely in Python. A collection of widgets using the framework have already been developed.
It is designed to work with Linux desktop. But it should be easy to port to other platforms, since Cairo is cross-platform, in my opinion.
Disadvantages
It's not updated frequently. The latest version, 0.1.6, was released on 2012-01-27
Its home page has been down for some time. Launchpad works though.
Only Python 2 is supported.
You can check out PyGTK, which will allow you to create desktop widgets, but they won't be managed by OSX's Dashboard. If you'd like to develop an OSX widget, you'll want to stick with HTML/CSS/JavaScript.
Take a look at pyqt4. It has webkit integration. I was looking into this myself but haven't really had time to dig into the API.
Related
I'm planning to take a non-GUI Linux distro (no Gnome, KDE, etc) and build my own front-end GUI for it. While I have a few years of Python programming experience, I have never attempted to do something quite like this.
To be more specific about my project, I'm building a CarPC and I have everything pretty much worked out so far, except the front-end. Most pre-existing front-ends for CarPCs run on Windows and the ones that run on Linux are hard to find (they either quit development or only run on specific hardware). My front-end will always be full-screen and I do not want to run a desktop environment unless I absolutely have to; it would just slow down the boot time and provide unnecessary features.
My question is basically where I should start. What Python graphics libraries are out there that would allow me to build a front-end GUI without a desktop environment?
You'll probably want to look at other answers and questions on this topic such as this one
Another good link is this one on the Python websitewhich lists different GUI toolkits.
While I haven't used it, Kivy looks like a good place to start. It's apparently got touch screen capabilities which I assume you would use and it doesn't look constrained to a GUI desktop env.
Hopefully you can find a way to do this without a desktop env. If not perhaps consider using X11 as your layer and go from there.
You should probably consider DirectFB. You can even use a DE on it if you like (although not required).
WxPython is awesome. I use it with Python and plain WxWidgets in C++ too. I've had great luck with making native GUIs from it and internationalization is supported too. Good luck!
Edit: I missed the "without a desktop environment bit". I'm not sure my answer is relevant. You should edit the Title of the question. Just disregard.
I have the following data scheme that I want to turn into an application. A regular desktop GUI would probably the best.
UML Diagram http://img217.imageshack.us/img217/341/56836587.jpg
big version
The whole thing would be developed on a Linux (Ubuntu, Gnome) machine, and then used on a Windows Vista computer. If Windows is a problem, I might be able to just run it in a Linux VM later.
My programming language of choice would be Python. I have only used Qt for a two hour project, I have pretty much no experience with GUI. Would Qt work easily on Windows and not look to out of place there? Is GTK a way better option, or is that merely preference issue?
From talking on the #python channel, I gathered that storing the data in a SQLite database would be a good option, and accessing this data via the SQLAlchemy ORM would be better than writing SQL statements by hand. The latter is my usual approach, I want to use this project to learn something better.
Can I just design the dialogues in Qt Designer and use them with my Python objects?
You might want to check out Dabo.
Dabo is a 3-tier, cross-platform application development framework, written in Python atop the wxPython GUI toolkit
Camelot
If you are set on using Python them I think Qt would be am excellent choice. It's a fantastic framework that looks good and runs on many platforms. You won't be limited to Windows. Qt can be a bit intimidating but you won't be limited in terms of functionality. The Qt designer works well with Python.
SQLAlchemy works on all common desktop platforms, including Windows.
What are good python libraries for the following needs:
MVC
Domain Abstraction
Database Abstraction
Video library (just to create thumbnails)
I already know that SQLAlchemy is really good for Database Abstraction so don't bother with it unless you want to suggest a better one.
Edit: This might seem stupid to mention but I'm talking about MVC for GUI and not for web, just mentioning for clarification
Edit: Also does the MVC part contain GUI part or can I use a separate library for GUI like PyQt
Have you tried wxWidgets (well, wxPython in fact)?
It has nice documentation (which is always a good thing), and allows creating code in MVC manner. It's just the GUI library, but allows some simple image manipulation (if it's not good enough for you try using Python version of ImageMagick). It uses native controls, so the application looks native on the OS it's being ran.
PyQt on the other hand has even better docs than wxWidgets or wxPython, but I could never get used to the look&feel of its GUI (it's custom, so it doesn't look native on any OS). Because riverbankcomputing couldn't agree with nokia on a license nokia started a project called PySide which is a LGPL version of the Qt-bindings. It's supposed to be finished in early 2010.
django is a pretty good mvc framework with an orm
You could go with http://turbogears.org/ . Its like Django, but uses "of the shelves" existing modules.
TurboGears 2 is the built on top of the experience of several next generation web frameworks including TurboGears 1 (of course), Django, and Rails. All of these frameworks had limitations which were frustrating in various ways, and TG2 is an answer to that frustration. We wanted something that had:
Real multi-database support
Horizontal data partitioning (sharding)
Support for a variety of JavaScript toolkits, and new widget system to make building ajax heavy apps easier
Support for multiple data-exchange formats.
Built in extensibility via standard WSGI components
I need to create a desktop app that will work with Windows and Gnome(Ubuntu). I would like to use Python to do this. The GUI part of the app will be a single form with a message area and a couple of buttons.
The list of GUI's for Python seems overwhelming. I am looking for something simple if possible, the main requirements is it must work with Gnome(2.26 and up) and Windows XP/Vista/7.
You might want to check out wxPython. It's a mature project and should work on Windows
and Linux (Gnome).
PyGTK is a very popular GUI toolkit, but usually quite a bit easier to use on Linux than on Windows.
Have you checked the extensive list of GUI libs for Python? For something simple I recommend, as does the list, EasyGUI.
You can also try PyQt or PySide. Both are Python wrappers to Qt. PyQt is the original wrapper; PySide is a new project by Qt Development Frameworks/Nokia that has pretty much the same aims as PyQt, just with different licensing. PyQt is more mature, but licensing is more restrictive; PySide is quite new (in alpha/beta) but with more liberal licensing. However, for real information on licensing, check their site and preferably with a lawyer if it concerns you.
I'm planning on using an embedded browser in my pygtk application and I'm debating between gtkmozembed and pywebkitgtk. Is there any compelling difference between the two? Are there any third options that I don't know about?
It should be noted that I won't be using this to access content on the web. I'm mainly using it for UI purposes.
My priorities are:
It needs to be stable.
It needs to be cross-platform.
It should be easy to use.
It should be actively maintained.
It should be extensible.
It should be fast.
gtkmozembed is not available on Windows, although you can use the gecko embedding interface directly. This would require you to write some C++ code.
As far as I know, the gtk webkit port is not available on Windows yet, and still appears to be undergoing a lot of change.
For an example of a cross-platform gecko embedding solution, check out Miro.
Miro is python, and they've written just a couple of C++ classes to embed gecko on Windows, while using gtkmozembed on linux.
if you judge by the web pages then definitely pywebkitgtk
pygtkmoz from this page
"Note: this project is no longer maintained. Please use gnome-python-extras (http://www.pygtk.org) instead. I apologize for any trouble this might cause, but this is better in the long run. Python bindings for GtkEmbedMozilla."
and pywebkitgtk looks like active project changes