Supported software¶
Alfred versions¶
Alfred-Workflow works with all versions of Alfred 2 and 3, but you must own the Powerpack to use Alfred’s workflow feature.
All Script Filter features provided by Alfred 2 as of v2.8.3 are supported in the latest version of Alfred-Workflow.
The Workflow
class is compatible with both Alfred 2
and Alfred 3. The Workflow3
class is only
compatible with Alfred 3.
Workflow3
uses Alfred 3’s JSON feedback format.
It supports workflow variables and more advanced
modifiers than Workflow
/Alfred 2.
OS X versions¶
Alfred-Workflow supports the same OS X versions as Alfred 2, namely 10.6 (Snow Leopard) and later.
Note
Notifications, added in version 1.15 of Alfred-Workflow, are only available on Mountain Lion (10.8) and above.
Python versions¶
Alfred-Workflow supports the 2.6 and 2.7 system Pythons installed on OS X
10.6 (Snow Leopard) and newer (i.e. /usr/bin/python
).
Python 3 is not supported and does not work.
Other, non-Apple, non-system versions of Python 2.x (e.g. Homebrew, conda, pyenv etc.) are also not supported and may or may not work.
Here is the full list of new features in Python 2.7, but the most important things if you want your workflow to run on Snow Leopard/Python 2.6 are:
argparse
is not available in 2.6. Usegetopt
or include argparse in your workflow. Personally, I’m a big fan of docopt for parsing command-line arguments, butargparse
is better for certain use cases.- No dictionary views in 2.6.
- No set literals.
- No dictionary or set comprehensions.
- You must specify field numbers for
str.format()
, i.e.'{0}.{1}'.format(first, second)
not just'{}.{}'.format(first, second)
. - No
Counter
orOrderedDict
incollections
.
Python 2.6 is still included in later versions of OS X (up to and including
Yosemite), so run your Python scripts with /usr/bin/python2.6
in addition to
/usr/bin/python
(2.7) to make sure they will run on Snow Leopard.
Why no Python 3 support?¶
Three-and-a-half big reasons:
- Python 3 isn’t installed by default on any version of OS X.
- Python 3 doesn’t get along well with Alfred 2.
- Alfred-Workflow is precisely the kind of project that’s hard to make 2- and 3-compatible.
- Python 2.6 compatiblity is a hard requirement, and writing 2.6- and 3-compatible code is even harder.
Now that Alfred 3 is available and has some significant new features, there is no chance of this version (1.x.x) of Alfred-Workflow getting Python 3 support, as development has effectively stopped in favour of version 2.
When Python 3 support comes, it will be in version 2 or 3 of the library, which are targeted at Alfred 3, which eliminates problems 2 and 4.