1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3"""
4running even from the fontforge menu
5"""
6
7import sys
8import os
9import subprocess
10
11#putting the folder of this file on the list of import paths
12sys.path.reverse();
13sys.path.append(os.path.dirname(sys.modules[__name__].__file__))
14sys.path.reverse();
15
16evenpath = os.path.dirname(sys.modules[__name__].__file__) + "/Even"
17
18def runEvenShell(data = None, glyphOrFont = None):
19    """Run even"""
20    subprocess.Popen([evenpath, ''])
21    #subprocess.call([evenpath, ''])
22
23if fontforge.hasUserInterface():
24    fontforge.registerMenuItem(runEvenShell, None, None, ("Font","Glyph"),
25                                None, "Even Design Tool");
26
27