Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (29 sloc) 0.892 kb
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# COPYRIGHT: Openmoko Inc. 2012
# LICENSE: GPL Version 3 or later
# DESCRIPTION: Create Article Indices
# AUTHORS: Sean Moss-Pultz <sean@openmoko.com>
# Christopher Hall <hsw@openmoko.com>
# Hank Wang <hank@openmoko.com>
import os
def opj(path):
"""Convert paths to the platform-specific separator"""
st = apply(os.path.join, tuple(path.split('/')))
# HACK: on Linux, a leading / gets lost...
if path.startswith('/'):
st = '/' + st
return st
def getProgramFolder():
moduleFile = __file__
moduleDir = os.path.split(os.path.abspath(moduleFile))[0]
programFolder = os.path.abspath(moduleDir)
return programFolder
def resource_path(relative):
return os.path.join(
os.environ.get(
"_MEIPASS2",
os.path.abspath(".")
),
relative
)
Jump to Line
Something went wrong with that request. Please try again.