#2 Fixed Metrics Module Import

open
nobody
None
5
2011-08-18
2011-08-18
Cerin
No

Frustratingly, the default install doesn't make PyMetrics executable, or place it in any convenient path for executing it.

I fixed this on my Ubuntu install by running:

sudo ln -s /usr/local/lib/python2.6/dist-packages/PyMetrics/PyMetrics.py /usr/bin/PyMetrics.py
sudo chmod +x /usr/bin/PyMetrics.py

However, due to the mechanism PyMetrics uses to locate metric modules, executing PyMetrics.py from an arbitrary location would usually result in failed imports of metrics. I've fixed this by modifying the __importMetricModules() function to test different import locations.

Discussion

  • Cerin
    Cerin
    2011-08-18