Tag Archives: Python

Omega Hymnal improvements

Since uploading Omega Hymnal to Github ten days ago, I’ve made numerous improvements.  It almost seems like it’s time to slap a version number on it and call it a release.  Here’s a rundown of the features and fixes:omegahymnal-ss-2014-1-22

  • The utility links (import/export/settings/etc) are all grouped under a “Tools” submenu
  • I removed the default DB file from the source, so if you happen to use the default settings I won’t clobber your database when you “git pull”.
  • Omega Hymnal can initialize a clean database if you don’t have one, or you can reinit your database if you want to start clean.
  • I fixed a lot of nuttiness in the auto-text-sizer on the song screen. It’s more consistent now.
  • I added the capability to manually insert pagebreaks in the lyrics using the [pagebreak] tag. This is an alternative to manually shuffling things between text boxes.

Not sure where to go next, hopefully I can convince some others to start using this and get some good ideas. I’d love to figure out a way that I can make lyrics + chord entry a lot easier and less geeky (the world apparently doesn’t share my love of markup languages), though my ideas so far either go beyond the limits of JS or just over-complicate the problem.

Introducing Omega Hymnal

I’d like to announce the availability of a new program that I’ve been writing, Omega Hymnal. Omega Hymnal is a lyrics display program for informal worship settings.

omegahymnal_ss_1.png omegahymnal_ss_2.png

(more…)

LIFTS: the Large Internet File Transfer System

Some time back, I wrote a little utility at work using CherryPy called EasyLIFT. The idea was to reduce the number of large files that were being sent as email attachments without having to resort to the tedium of setting up FTP accounts or a big complex CMS system.

EasyLIFT allowed users to login through their LDAP credentials, upload a file to a public-facing web server, and dispatch an email with the download location to recipients. The interface was minimal and quick to use, and was a real success at work.

Recently, I was looking for an open source project to keep my coding skills sharp, so I decided to do a clean re-implementation of the EasyLIFT idea using Flask instead of CherryPy. I dubbed the project LIFTS for “Large Internet File Transfer System”. No, we aren’t transferring “Large Internet Files”, or transferring Files over the “Large Internet”, but ILFTS is kind of goofy and not memorable, so there you have it.

The project is fairly young and not fully functional yet, but if you’re interested in pitching in or just checking it out, head on over to github and grab it from the repo: https://github.com/alandmoore/lifts.

More news to come, hopefully!

Python Code completion in Emacs — at last!

I’ve been coding Python in Emacs for years now, and for the most part it’s been a satisfactory experience. After experimenting with various python modes and utilities, I’ve had a pretty good environment that marries Emacs editing to syntax highlighting, real-time error highlighting, the ipython shell, linting tools like pylint and pep8, and various other goodies. But the one hole, the one sore spot in the whole works, was code completion. Something even idle can do out-of-the-box was simply beyond my ability to get functional in Emacs.

I’d tried just about every solution the internet could offer: PyMacs, company-mode, anything-mode, ipython completion, standard autocomplete-mode. Everything I tried either gave unacceptable results (like autocomplete-mode, which just scans the current buffer for completion information), or just flat-out didn’t work no matter how many tutorials I followed.

Here lately I’ve been trying to work a lot more on my Pythoning, so I decided to see if the state of the art has caught up with this need. Echo base, I’ve found it. Repeat: I’ve found it.

(more…)

Tkinter: not dead yet!

If you follow my posts or projects much, you know that, when it comes to GUI toolkits for Python, I’m a confirmed PyQT guy. QT is arguably the most advanced, polished, complete, and powerful GUI toolkit do-everything programming library out there, and a treat to use. But sometimes it’s overkill, and when I have to put together something quick for certain legacy OS that lack decent package management, having to load in Python and extra libraries just to get a couple text fields and a button doesn’t make sense1.

Wouldn’t it be great if there was a really simple, easy to use, lightweight graphics toolkit built right in to the standard Python libraries, so you could pop together those little one-window GUIs without loading in extra stuff? Well, hey, what’s this dusty thing over here in the corner? It looks like… Tkinter!?!??

(more…)

WCGBrowser update: http_proxy and more

For users of WCGBrowser…

In the last few days I’ve added a few features:

  • Firstly, proxy server settings. Several people requested this, though none wanted to sponsor development (I only asked $100 US). Turns out I needed it for something I was doing myself, so happy birthday everyone, you get this for free. Proxy settings can be set from the CLI, config file, or environment variables (common on many Linuxes).
  • Secondly, stylesheets. Not that there’s much to style on WCGBrowser (the navigation bar, mostly), but you can now do it with QSS style sheets. A (really tasteless) example stylesheet is included.

Latest code can of course be downloaded from the wcgbrowser github page, or just do a “git pull” if you cloned it from there in the first place.

Enjoy! 😀

From PHP to Python: things I wish I’d known

The story so far…

Back around 2005 I took my first leap into the world of writing useful programs armed only with my laptop, a Pentium II running Debian, and a fat book on PHP5. Though I’d taken a few classes on C++ and tinkered with BASIC on a few different platforms over the years, I’d never managed to produce anything that actually did anything practical (or, did it very well, at any rate); with PHP, though, it didn’t take long to spread my coding wings and take to the air as a novice web developer.

Before long, my skills proved useful in some critical situations at work, and my place as a web developer was cemented. My PHP code became more mature as I learned hard lessons of experience and combined them with the programming theory and computer science I was avidly consuming on the web.

Around the same time, I got interested in Python when I saw a coworker using it to build powerful desktop applications quickly and effortlessly; I wanted to round out my programming skills with a “desktop stack” as quick and simple as PHP, and Python turned out to be a good choice.

So for a few years now I’ve written mainly in these two languages, PHP for the web and Python for the desktop. As my applications have grown bigger and more complex, I began to develop a growing discontentment with PHP on a number of levels. So when people started talking about doing web development in Python, I had to see if I could make the switch.

(more…)

KiLauncher and Qt Stylesheets

The default theme of KiLauncher

The default theme for KiLauncher. Ok, so it kind of looks like your gramma’s formica breakfast table from the 1970s.

I’ve been doing a lot of tinkering on my KiLauncher project over the last week or so, and it’s not only shaping up into a nice useful little application, but an educational opportunity as well

My goals for KiLauncher were to make it both theme-able, and configurable with plain-text files.  The natural mechanism for this (for the theme, anyway) was CSS, a format with which any self-respecting UI designer is familiar.  Fortunately, Qt supports a subset of CSS to style its GUI classes, sometimes referred to as QSS.

(more…)

New project:KiLauncher

Last night i uploaded a new project to my github page, KiLauncher.  It’s a fullscreen, static (as in not auto-updating) launcher menu aimed at kiosks, kids computers, corporate systems, and any other situation where an administrator wants to be able to both provide a simple interface and exercise some control over what applications are available to the user.

The software is still in the early stages, of course; I’m still working out the best way to structure the config file; yet it meets all its primary goals at this point and works just fine.  It’s built in python and QT of course, and after my positive experience using YAML in wcgbrowser, I’m of course using it for KiLauncher too. Unlike wcgbrowser, I don’t have a real-world use for this software yet, but maybe someone who does can give me some feedback on it.

« Previous Page