Tea Timer 1.8 beta2

The new beta of Tea Timer 1.8 supports Growl 1.3 as well as 1.2 (if I didn’t break anything ;-))

If no further problems arise, I’ll release 1.8 final within this month.

Download Tea Timer 1.8b2

SimPy 2.2

SimPy is a process-based discrete-event simulation library written in pure Python.

Ontje Lünsdorf and I have already contributed to prior version of SimPy and now have become members of the SimPy team.

In SimPy 2.2, we have restructured the package layout to be conform to the Hitchhiker’s Guide to packaging. We ported the the unit tests (524 test cases) to pytest. We improved and cleaned up parts of the documentation and finally, we fixed the behavior of Store._put—thanks to Johannes Koomer for the heads-up and the fix.

You can download SimPy from PyPI.

Tea Timer 1.8 beta1

It’s been a while since I released a new version of Tea Timer. But finally, here it is: Tea Timer 1.8 (beta)!

I resolved (or rejected ;-)) most of the issues that arose during the last couple of months. Unfortunately, I could not reproduce all bugs, so that’s why there is this beta.

Things that have changed:

  • Alarms are now called asynchronously, so the sound, voice and Growl message appear all at the same time (instead of sequentially after each other as before).
  • The list of alarm sounds and voices is now created dynamically and thus contain Lion’s new voices.
  • Fixed a bug with keep alarming and sticky Growl messages. You won’t get flooded by them anymore. Instead, there will be only one sticky Growl message when keep alarming is activated.
  • Editing the fields for the timer target (e.g. “Tea”) or ready in / in during a countdown will now longer reset the countdown. However, editing the countdown time during an active countdown will reset the countdown accordingly.
  • Finally, there is a pink background!

Thins I didn’t change:

  • I could not reproduce the rendering problems on Lion.
  • I could not reproduce issue #15.

If you find any bugs and have Dashcode installed, please also test the widget there. It might help to reproducing (and fixing) the problems. Dashboard widgets are just HTML/CSS/JavaScript, so don’t be afraid. ;-)

You can find the issue tracker at bitbucket.

Download Tea Timer 1.8b1

django-lastfm 1.0.1

Django-lastfm is a small Django app that allows you to embed your charts or recently listened tracks from Last.fm into your website. You can see the widget in action in the sidebar of this website.

Version 1.0.1 includes a few minor bugfixes and a more comprehensive test coverage.

You can find django-lastfm in the Cheese Shop or at Bitbucket.

A New Design

After running the old design for three and a half years, I now present the first redesign of this blog. I actually started to work on a new design in July 2010, but abandoned it until December (because I didn’t have a really good idea for it).

I kept the blue and green color tones, but removed nearly every graphic (I’m not a designer anyway). However, I’m using quite a few CCS3 features (like rounded borders, gradients, shadows or web-fonts) and created a fluid layout that should come in handy especially for smart phone or netbook users.

Building NumPy, SciPy & Matplotlib for Python 2.7 on Snow Leopard

A few days ago I wrote about how to build SciPy for Python 2.7 on Mac OS 10.6 Snow Leopard.

Usually you want to install NumPy, SciPy and Matplotlib. After reading Installing SciPy/Mac OS X, the Matplotlib installation instructions and the HJBlog you might come to the conclusion, that it’s not trivial to build them on your own and that you better use the 32bit binaries for Python 2.6 or get them via MacPorts.

But actually it’s really easy. The only dependencies that you need to install are Xcode (for gcc and X11) and gfortran.

To simplify the the installation, I wrote a small Makefile that downloads all packages (except for Xcode) and builds/installs them:

  1. Rename* the downloaded makefile to Makefile, open Terminal and cd to the diretory with the makefile.

  2. Download gfortran and start the graphical installer:

    $ make fortran
    
  3. Download and install NumPy, SciPy and Matplotlib:

    $ make
    
  4. Run NumPy’s and SciPy’s test suite and delete the temporary build diretory:

    $ make test clean
    

That’s how the makefile looks like:

# Download all packages to this directory.
TMP_DIR=./PYTMP

# Select Python version.
PYVERSION=2.7
PYTHON=python${PYVERSION}

# Package to download frm http://r.research.att.com/
FORTRANPACKAGE=gfortran-42-5664.pkg

# Select which versions of the packages you want to install.
NUMPYVERSION=1.5.0
SCIPYVERSION=0.8.0
MATPLOTLIBMAJORVERSION=1.0
MATPLOTLIBVERSION=${MATPLOTLIBMAJORVERSION}.0

# Normally, you shouldn’t need change this.
OSX_SDK_VER=10.6
ARCH_FLAGS=-arch i386 -arch x86_64

# Values for some environment variables. You shouldn’t need to change this.
MACOSX_DEPLOYMENT_TARGET=${OSX_SDK_VER}
CFLAGS="${ARCH_FLAGS} -I/usr/X11/include -I/usr/X11/include/freetype2 -isysroot /Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk"
LDFLAGS="-Wall -undefined dynamic_lookup -bundle ${ARCH_FLAGS} -L/usr/X11/lib -syslibroot,/Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk"
FFLAGS="${ARCH_FLAGS}"


default: all

# Create a temporary directory for the build process
_tmp_dir:
    mkdir -p ${TMP_DIR}

# Clean the the temporary build directory
clean:
    rm -rf ${TMP_DIR}

# Download gfortran and start the installer
fortran: _tmp_dir
    cd ${TMP_DIR} && \
    ${PYTHON} -c "import urllib; urllib.urlretrieve('http://r.research.att.com/${FORTRANPACKAGE}', '${FORTRANPACKAGE}')" && \
    open ${FORTRANPACKAGE}

# Download all required packages
fetch: _tmp_dir
    cd ${TMP_DIR} && \
    ${PYTHON} -c "import urllib; urllib.urlretrieve('http://sourceforge.net/projects/numpy/files/NumPy/${NUMPYVERSION}/numpy-${NUMPYVERSION}.tar.gz/download', 'numpy-${NUMPYVERSION}.tar.gz')" && \
    ${PYTHON} -c "import urllib; urllib.urlretrieve('http://sourceforge.net/projects/scipy/files/scipy/${SCIPYVERSION}/scipy-${SCIPYVERSION}.tar.gz/download', 'scipy-${SCIPYVERSION}.tar.gz')" && \
    ${PYTHON} -c "import urllib; urllib.urlretrieve('http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-${MATPLOTLIBMAJORVERSION}/matplotlib-${MATPLOTLIBVERSION}.tar.gz/download', 'matplotlib-${MATPLOTLIBVERSION}.tar.gz')"

# Extract, build and install NumPy
numpy:
    cd ${TMP_DIR} && \
    rm -rf numpy-${NUMPYVERSION} && \
    tar -xf numpy-${NUMPYVERSION}.tar.gz && \
    cd numpy-${NUMPYVERSION} && \
    export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} && \
    export CFLAGS=${CFLAGS} && \
    export LDFLAGS=${LDFLAGS} && \
    export FFLAGS=${FFLAGS} && \
    ${PYTHON} setup.py build && \
    ${PYTHON} setup.py install && \
    cd .. && \
    ${PYTHON} -c "import numpy; print 'Installed NumPy', numpy.__version__"

# Extract, build and install SciPy
scipy:
    cd ${TMP_DIR} && \
    rm -rf scipy-${SCIPYVERSION} && \
    tar -xf scipy-${SCIPYVERSION}.tar.gz && \
    cd scipy-${SCIPYVERSION} && \
    export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} && \
    export CFLAGS=${CFLAGS} && \
    export LDFLAGS=${LDFLAGS} && \
    export FFLAGS=${FFLAGS} && \
    ${PYTHON} setup.py build && \
    ${PYTHON} setup.py install && \
    cd .. && \
    ${PYTHON} -c "import scipy; print 'Installed SciPy', scipy.__version__"

# Extract, build and install Matplotlib
matplotlib:
    cd ${TMP_DIR} && \
    rm -rf matplotlib-${MATPLOTLIBVERSION} && \
    tar -xf matplotlib-${MATPLOTLIBVERSION}.tar.gz && \
    cd matplotlib-${MATPLOTLIBVERSION} && \
    export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} && \
    export CFLAGS=${CFLAGS} && \
    export LDFLAGS=${LDFLAGS} && \
    ${PYTHON} setup.py build && \
    ${PYTHON} setup.py install && \
    cd .. && \
    ${PYTHON} -c "import matplotlib; print 'Installed Matplotlib', matplotlib.__version__"

# Fetch and build NumPy, SciPy and Matplotlib
all: fetch numpy scipy matplotlib
    echo "all done"

# Execute tests for NumPy and SciPy
test: _tmp_dir
    export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} && \
    export CFLAGS=${CFLAGS} && \
    export LDFLAGS=${LDFLAGS} && \
    export FFLAGS=${FFLAGS} && \
    cd ${TMP_DIR} && \
    ${PYTHON} -c "import numpy; numpy.test('1', '10')" && \
    ${PYTHON} -c "import scipy; scipy.test('1', '10')"

I have only tested it on my local machine yet. Hope, it helps and you don’t run into any troubles.

* If you don’t rename the makefile, you must pass it’s name to make: make -f Makefile_nsm <target>.

Building SciPy on Snow Leopard with Python 2.7

I recently had some struggle to build and install SciPy 0.8.0 on Mac OS X 10.6 Snow Leopard, but actually it’s quite easy.

I used the instructions on scipy.org and the HJBlog as source. Since there are builds of NumPy 1.5.0 for Python 2.7 available, you don’t need to install fftw and umfpack manually.

You only need to install gfortran from this site. Pick the latest build for Snow Leopard (e.g. this one).

Next, install NumPy with the disk image from SourceForge or with pip:

$ pip install numpy

To build and install SciPy, download the latest version from SourceForge and do the following:

$ tar -xf scipy-0.8.0.tar.gz
$ cd scipy-0.8.0
$ export CFLAGS="-arch i386 -arch x86_64"
$ export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64"
$ export FFLAGS="-arch i386 -arch x86_64"
$ export MACOSX_DEPLOYMENT_TARGET=10.6
$ python setup.py build
$ python setup.py install

Everything in one command:

$ CFLAGS="-arch i386 -arch x86_64" LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64" FFLAGS="-arch i386 -arch x86_64" MACOSX_DEPLOYMENT_TARGET=10.6 python setup.py build install

I hope this works for you as well as it did for me.

django-lastfm 1.0

Django-lastfm is a small Django app that allows you to embed your charts or recently listened tracks from Last.fm into your website. You can see the widget in action in the sidebar of this website.

I raised its version to 1.0 since there have been no problems for a long time and there are also no features I want to include.

You can find django-lastfm in the Cheese Shop or at Bitbucket.

django-sphinxdoc 1.0

Most Python projects use Sphinx for their documentation. And many (most?) Python powered websites use Django as framework.

So there might be some people who use both Sphinx and Django. If you belong to this group and want to integrate the documentation of your projects into your Django powered website, django-sphinxdoc might be the app you’re searching for.

Django-sphinxdoc can build and import your Sphinxdocumentation and provides views for browsing and searching it. You can see django-sphinxdoc in action be reading its documentation.

What’s new in this version?

  • You can now search the documentation (via Haystack).
  • New management command updatedoc for importing and building JSON files from your documentation and updating Haystack’s search index.
  • New model Document for JSON files.
  • Renamed the App model to Project

What’s planned for the future?

  • Allow users to comment the documentation.

You can find django-sphinxdoc in the Cheese Shop or at Bitbucket.

Tea Timer 1.7.1

Tea Timer 1.7.1 is final now. Thank you for testing. Tea Timer also rembers now if you don’t want to update to a specific version and won’t show the update dialog until the next update.

Download | ChangeLog

« newer posts older posts »