Entries tagged as 'python'
This page lists all postings that have been tagged with the chosen tag.
I’m sure you’ve sensed all the buzz about Ubuntu going multitouch. I truly think that this is some great news, being the multitouch and HCI enthusiast that I am. But what if you want to test your multitouch hardware? Or if you want to actually develop multitouch applications? Here’s something for you: PyMT has just been released in version 0.5!
We’ve been working hard to make this reality, and many a new feature has been added and quite a few bugs have been squashed. I suggest you read the full changelog and, if you already have a PyMT 0.4 application, also the migration guide.
One of the coolest new things with this release is the availability of portable binary packages for Windows and OS X. Those come bundled with everything you need (on Windows, even Python) to get started. You simply download the package for your platform and run it. We didn’t provide a portable package for Ubuntu, but it’s ridiculously easy to install PyMT there anyways. On Ubuntu 10.10, all you need is:
sudo apt-get install python-pymt
PyMT has native support for multitouch devices on Linux that are supported by the kernel, all Windows 7 multitouch devices, all of Apple’s multitouch accessories and much more. If you know basic python, PyMT is the easiest way to create multitouch applications or to just test your hardware.
In future releases we’re planning to fully use a rewrite of our current OpenGL abstraction and other performance-critical parts (that we start doing in C) that will allow for much higher application speed, less battery consumption and OpenGL ES/3.0 compatibility so that we can smoothly run on portable slate/pad devices.
Lastly, see what people have done with it (planet readers, click the images to get to the videos):
I hope that sparked your interest. We also hope you enjoy PyMT. If there are any questions, bugs, problems or feature requests, let us know. There’s a mailing list, a google code issue tracker and our IRC channel at irc.freenode.net in #pymt.
| 1 comment | Aug 16, 2010 8:43:00 PM | multi-touch, nerdstuff, planet-pymt, planet-python, planet-ubuntu, pymt, python, technology |
Google’s Summer of Code 2010 comes to an end for me today. It has been a great time working on awesome projects like PyMT and Movid. My task was to enhance PyMT’s text input methods. One of the joys of this task was that it allowed me to work on a relatively wide scope of things. Here’s a brief list of what I worked on:
Some of that is already in PyMT 0.5. All of the Movid stuff will be in the first release. In future releases we shall see much improved versions of these prototypes and hopefully even context aware word suggestions.
Here are the two promised videos, if you’re reading this through a planet, please go directly to my blog.
Prototype WipeToType Keyboard for PyMT from Christopher Denter on Vimeo.
Ergonomic multitouch keyboard prototype from Christopher Denter on Vimeo.
Thanks to all the people who made this possible. Thanks Google, Christian, Pawel, Mathieu and Thomas, for being (a) fantastic mentor(s). It has been a great pleasure and privilege to work with you in GSoC 2010 and I sure will continue to work on both projects.
| 2 comments | Aug 16, 2010 7:31:00 PM | gsoc, movid, multi-touch, nerdstuff, planet-pymt, planet-python, planet-ubuntu, pymt, python, technology, text input |
I just had the opportunity to take a video of my multitouch table with my software in action. Both hardware and software were built for my bachelor’s thesis which I handed in in march. The software that you see at the end is written in Python with PyMT, using the VTK library.
Medical Multitouch from Christopher Denter on Vimeo.
Reading through a planet? Click here!
For more information, see the video description. PS: Although it supports all platforms, it currently runs on ubuntu. :-)
Let me know what you think!
| 6 comments | Jul 13, 2010 1:28:13 AM | hci, movid, multi-touch, planet-pymt, planet-python, planet-ubuntu, pymt, python, technology |
Many things happened in the last few weeks. I just want to quickly outline them in case you’ve been wondering what I’ve been doing.
Starting with PyMT 0.5 (to be released in August), we added support for spelling correction and word suggestions. This is based on my GSoC work. The code has been polished and integrated into the master branch, which will soon lead to the 0.5 release. I’m also currently working on a text input widget that indicates incorrectly spelled words as you type (just as OpenOffice would). This much is working. In a next step, I plan to add a feature that lets you select from a list of suggestions for the word that you just tapped.
One of the tasks of my GSoC proposal is the implementation of a Swype-like keyboard. What this means is that you just wipe over the keys that make up the word you want to type and it automatically determines which word you intended to enter. It is clearly far beyond the scope of a single, multitouch-oriented GSoC proposal to implement something as clever as a Swype clone (especially since this also requires A LOT of backend code for the intelligence). However, something remotely similar and usable should be doable and is what I’m looking for. A while back I started something like this and quickly sketched a modified version of the virtual keyboard.
This still needs much more love, but keeping in mind that I did this in a really short amount of time I think I can say that we’re getting somewhere.
Thomas, Mathieu and I have had the chance to meet in Lille at the FITG conference and present PyMT in a talk and several workshops. This was a great opportunity and in fact, it was the biggest real-life meeting of core developers and users so far.
The conference itself was a great success, both for the organizers and us. We had many people come to us and ask questions concerning PyMT and Movid. After our talk (which I think was well-received) we decided to give an additional workshop so that people interested could play with PyMT and get help from us. The room was pretty crowded and people were standing. The workshop presented a basic PyMT overview and first steps in a ‘hello world’ fashion (At least I think that’s what Mathieu was talking about. He spoke french and Thomas and I were answering questions or translating things in English). In the evening we gathered all the people that were still at the conference and went to a nice little restaurant to chat.
The next day we gave two more workshops. The idea to do the first one came up while we had breakfast. We decided to implement a simple version of the game at linerider.com with PyMT. When we arrived an hour later, we just picked a python 2D physics library that was easy to install and started live and from scratch, without any actual code having been written (or even thought about) beforehand. Luckily it all turned out well. After almost exactly one hour (in which Mathieu helped people in the audience, Thomas pointed to and explaining stuff at the projection and I coded and talked) we had finished what we were looking for in just 60 lines of unoptimized python code. The last workshop was about advanced OpenGL. Mathieu presented some of his insights that he had gathered while optimizing PyMT’s performance (great advances have been done here, by the way).
I stayed four days in total and it was absolutely worth it. Lille is a wonderful city and the conference was fantastic. The venue itself was just mind-blowing to begin with. We had a lot of fun together and obviously worked on PyMT as well. It’s even more fun if we’re in the same room! Sincere thanks to everyone involved in making these days as awesome as they were!
For our talk in Lille, we used a very nice presentation tool (PreseMT) which is, obviously, written with PyMT. While using it for my own bachelor’s colloquium (I’m officially a Bachelor of Science now, by the way) I noticed that entering text suffered from severe limitations of the text input widget. Given that I had no multitouch-capable device around to enter text, I did it all with my hardware keyboard. I added to PyMT’s TextArea widget the ability to resize automatically depending on the text that was entered (which is what you want in PreseMT). Furthermore, the widget now properly reacts to several special keys like the arrow keys, home, end, del, pgup and pgdown.
It is no secret that installing PyMT on OSX is a major pain. This is not our fault, though. The problem simply is that installing almost anything in non-app format involves a non-trivial compilation process using MacPorts and the like. Unfortunately, one of our dependencies (gstreamer) is not easily installed this way.
Since we really don’t want our users to go through all of this, we decided to distribute portable versions of PyMT for OSX, Linux and Windows. I did the OSX version and hope to be able to finish it soon so that it can be reviewed. With it, you just download a zip file, unzip it and go. It contains everything that is needed to run PyMT.
In the course of this, I also fixed the compilation of our OpenGL-dependant cython modules for OSX.
Hopefully you will see a wonderful PyMT release next month. We’ve added many new features, improvements and fixed a lot of bugs. Some of my GSoC work will also go into it. In terms of GSoC, I will finish the aforementioned spelling-aware text input widget. I also intend to improve the quality of the results of the WipeToType keyboard and implement the things left on my GSoC proposal.
| 0 comments | Jul 5, 2010 11:51:00 PM | gsoc, multi-touch, nerdstuff, planet-pymt, pymt, python, technology |
For those of you who don’t know it, if something provides Multi-Touch input methods, it means that you (and potentially an almost arbitrary number of other people) can interact with the same device using as many of your fingers as you like.
This technique is relatively new to most of us and I have been blown away when I first saw a video of someone interacting with a so-called Multi-Touch table:
(If you’re reading this posting via a planet or feed reader, please click this posting’s title to see the videos on my blog directly.)
In case you like the python programming language, you might be as excited as I was to know that there’s actually a library that allows you to write multi-touch software yourself. This library is PyMT. It’s based on top of OpenGL and allows you to deal with multi-touch input events in a nicely abstracted way. PyMT is cross-platform, open-source and actively developed. It comes with many examples, a mouse simulator (in case you don’t have such a table) and (in the development branch) support for the new touchpads found in recent macbooks as well as other types of hardware (HP touchsmart, etc.). Here’s an old demo video that shows what PyMT is capable of already:
I was so impressed by what is possible that I started diving into the matter quite some time ago. I’m even building my own table at the moment. The thesis I’m currently working on also relies on PyMT. If you got an appetite, feel free to join us in #pymt on irc.freenode.net or the mailing lists.
In order to show you how easy it can be, here’s a quick demo I just wrote.
If you are interested in building your own hardware (yes, you can), let me suggest you take a look at the excellent NUI community. They have software, forums and even a book available for free for you to learn and explore.
| 12 comments | Nov 19, 2009 12:14:00 PM | multi-touch, planet-python, planet-ubuntu, pymt, python, technology |
During 2008′s Google Summer of Code I introduced a new storage abstraction layer to the MoinMoin wiki engine. This allows you to run moin on a variety of backends (filesystem, mercurial, etc.).
This year (2009) I participated again. My application contained three major areas of work:
The first two objectives were finished quite well. Two different pieces of middleware were introduced for both, the ACLs and the routing. You can now use several different backends in a simple or optionally fairly complex way. You could just use one single filesystem backend or potentially hundreds of different backends, each with different ACLs applied, and mount each one into its own namespace (you may be familiar with this concept from UNIX, where you can mount discs and such into arbitrary places of the filesystem tree).
In addition to that, ACLs have been refactored. ‘revert’ and ‘delete’ were removed (obviously you will still be able to perform the corresponding actions from the UI), ‘create’ and ‘destroy’ were added.
As for the SQLAlchemy backend, we do have a somewhat working version. Unfortunately it still suffers from severe performance problems. Originally I wanted to fix that after SoC, but real-life (bachelor’s thesis, etc.) caught me, so I will have to postpone that. If you have some SQLAlchemy experience and want to help out here (or with something else), you are very welcome to join us (#moin-dev on irc.freenode.net).
For an overview of what else has been done during GSoC 2009 on the storage side of things, take a look at the following resources:
Please keep in mind that this is still fairly alpha. Especially the UI is for developers and geeks only and will be redone properly (with Jinja2) before the release (help needed here as well).
Thanks to the whole moin crew and especially my mentor Thomas Waldmann for the nice and fun collaboration!
(Oh and – hopefully – hello planet python!)
| 0 comments | Oct 20, 2009 2:57:00 AM | coding, gsoc, MoinMoin, planet-python, planet-ubuntu, python, sqlalchemy |
We all know that one of the cool things that Python offers is it’s interactive shell that makes it possible to quickly test things. It’s included in every Python release and can be invoked by simply entering ‘python’ on the command-line. While this is great already, the official interactive shell lacks several features that would be convenient (such as code completion, syntax hilighting, pasteservice support…). IPython is an attempt to provide an interactive python shell with the same capabilities, but additional goodies. I was using it mainly because it featured code completion.
I came to the python support channel today to ask about some strange behavior I had observed. Consider the following snippet:
In [1]: class Foo(object): ...: def __getattr__(self, attr): ...: print attr ...: ...: In [2]: foo = Foo() In [3]: foo.asd asd asd In [4]: Foo().asd asd
Now this should of course print ‘asd’ once in every case. This is IPython’s fault and seems to be related to this bug report. When asking about this, somebody suggested bpython. I headed over to their page and was quite pleased by what I saw in their video. bpython features syntax hilighting, code completion, expected parameters, rewind and pastebin support. See for yourself:
| 9 comments | Jun 2, 2009 4:19:00 PM | bpython, coding, planet-ubuntu, python |