While installing the ColdFusion Builder app I obtained at the ColdFusion 11 Launch Party last week, I needed a Java runtime. I recalled installing a Java 8 runtime on my Macs (or at least on one of them) , but couldn’t find it on the Mac Mini I currently use for development. I really should document the maintenance and configuration of my machines… and why not start now, on an autumn afternoon in October?
For a long time, I have wanted to play around with Python (the programming language, not the snake), but I never found enough time to try my hand at real, serious Python programming. But today I thought: why not whip up an instance of my favorite bug tracker and use that for my documentation? Trac, to be explicit, is a Python application that does what I want (and lots more), and it can be installed in the cloud – and that last part is useful if I want to make certain that I can read my docs even when the machines at home go down.
So I created a free “Beginner” account at the PythonAnywhere site, and started playing around in an attempt to get Trac 1.0.1 running on that site. There are instructions to be found on the PythonAnywhere Forums for just that purpose, but I managed to get a first reasonable response in just five simple steps:
- From the PythonAnywhere dashboard of your ‘Beginner’, start a ‘bash’ console;
- Run the ‘trac-admin /home/youruseraccountname/trac initenv’ command (substituting your account name for the ‘youruseraccountname’ part, of course) and giving your repository a name;
- Go to the ‘Web’ tab of your dashboard, and adapt the WSGI configuration file (just click on the link to this file, and you’ll be able to edit it in the browser). Comment out all the existing content or start from an empty file and add these lines:
import os import sys import trac import trac.web.main os.environ['TRAC_ENV'] = '/home/youruseraccountname/trac' os.environ['PYTHON_EGG_CACHE'] = '/tmp' trac_app = trac.web.main.dispatch_request
- Reload your app with the big green button;
- Check out your app at your PythonAnywhere address ;-)
No, you’re not done yet: you still need to configure Trac to your linking – but that is not different from any normal Trac configuration action. I’m currently the only user for my PA instance, and I just need the Wiki and the ticket tracker, so I won’t be trying to add user management and access control to Trac. Nor will I be using source control for the time being. But all that is quite possible, if I’m to believe the experts…