Posts tagged Python
During the last month I worked as upstream maintainer of LADI Tools and now I’m happy to introduce the first stable release! So, to answer the usual question “What’s new?”, here is a short description of the changes introduced (taken from the NEWS file included in the release tarball):
Laditools 1.0 «Lady “O”»
Apart from wladi and g15ladi, most of ladi* tools have been renamed:
ladicontrol-> ladi-control-center ladilog-> ladi-system-log laditray-> ladi-system-tray
Moreover, a new component has joined the LADI Tools suite: ladi-player. LADI Player is a convenient, graphical VLC-style application providing an all-in-one control interface to start, stop and monitor JACK as well as the session handler. It also provides basic controls for managing studios.
All the code was ported to GTK+ 3 and the new GObject Introspection mechanism.
Code refactoring and cleanup
The code has been reorganized in order to allow the use of Python objects by 3rd party applications.
To start writing code using the classes provided by laditools, simply do the following:
from laditools import *
Two-in-one solution for LADI System Tray
Formerly laditray was an implementation of GtkStatusIcon to put a nice right-clickable icon into the system tray to allow users access JACK controls easy way. It’s been mostly rewritten and now it shows an AppIndicator icon (if the library is available), or fall back to the Freedesktop.org’s old-fashioned System Tray Protocol Spec-compliant icon.
Project’s new homepage
New up-to-date packages will hit both Debian and Ubuntu soon!
Already available in both Maverick and Debian sid, it provides many interesting features.
I’m talkin’ about Font Manager, a small application written in C and Python by Jerry Casiano, which allows users to easily install, remove and compare font files on own system.
Here are few nice screenshots:
To install the application, as usual type:
sudo apt-get install font-manager
Let me know what you think!
I am very fond of those websites that allow users to upload files for a public viewing (called pastebin), usually I upload logs, links and other text files with pastebinit, a simple command-line tool, already available in Debian’s and Ubuntu’s archives, and I thought:
“Why don’t find a not-CLI solution to make it in a more fast and comfortable way?”
So I decided to write nautilus-pastebin, an extension for the GNOME file manager, which allows users to send files just a right-click away.
How does it work?
Simply: right-click on a file, select «Pastebin» and, if the Internet connection is active, after few seconds you will see a bubble like that one in this screenshot:
The extension doesn’t only show that notification, it also retrieves the MIME type in order to try to adjust the syntax highlighting parameter according to the configuration of the selected pastebin and finally copies the paste URL to the clipboard, allowing you to paste it in a browser tab, IRC channel or wherever you want.
The global configuration file is located into /etc path, but if you want to select another pastebin to use you may do it by creating a file like the following one:
pastebin = $GLOBAL_CONFIGFILE_SECTION
The file must be named as nautilus-pastebin.conf and saved under ~/.config/nautilus-pastebin/.
If problems occured during the past operation, you may see a message like the following:
Where can I download it? And how can install it?
You can find all the information that you need by opening the projects page, for the installation, after uncompressing the tarball, you can:
- Use the setup.py script.
- scripts/nautilus-pastebin.py to /usr/lib/nautilus/extensions-2.0/python/
- data/nautilus-pastebin.conf to /etc/ or in ~/.config/nautilus-pastebin/
- data/nautilus-pastebin.png to /usr/share/pixmaps/
After the installation, you may need to restart Nautilus:
Some pastebins of the preconfigured ones don’t work well and I need some time to improve and extend the support for other websites.
If you wanted to contribute to the development by sending me patches, configurations or suggestions I would be very happy!
That’s a screenshot:
This application, written in Python + GTK, collect informations about user’s hardware and software configuration, then compile an installation report according with the notebook page template of Ubuntu-it’s wiki.
For installation instructions and other informations about the project, please read this.
This Stephan Hermann’s article shows a simple and useful macro, which gets a Launchpad bug’s id and returns a link to its bugtracker page.
So, I had an idea: why don’t generalize it and make it compatible with other projects bugtrackers?
Ok, let’s start analyzing the code: