Ejemplo n.º 1
0
def relativePathToPiecesFolder():
    fishlamp = searchForFishLampFolder(None);

    if fishlamp:
        Utils.assertPathExists(fishlamp);

    return fishlamp
Ejemplo n.º 2
0
def absolutePathToPiecesFolder():
    fishlamp = relativePathToPiecesFolder();
    if fishlamp:
        fishlamp = os.path.abspath(fishlamp);
        Utils.assertPathExists(fishlamp);

    return fishlamp;
Ejemplo n.º 3
0
def allPieces():

    fishlamp = absolutePathToPiecesFolder();

    Utils.verbose("found " + fishlamp)

    pieces = [];
    for filename in Utils.findFiles(fishlamp, pieceFileName()):
        Utils.assertPathExists(filename);
        piece = Piece(filename);
        pieces.append(piece);

    return pieces;
Ejemplo n.º 4
0
 def subDirectoryPath(self, relativePathToPiecesFolder) :
     path = os.path.join(self.folderPath(), relativePathToPiecesFolder);
     return Utils.assertPathExists(path);
Ejemplo n.º 5
0
def templatePath(subDir) :
    return Utils.assertPathExists(os.path.join(os.path.join(scriptsPath(), "templates"), subDir));
Ejemplo n.º 6
0
def scriptsPath() :
    path = subprocess.check_output(["fishlamp", "scripts-path"]).strip();
    Utils.assertPathExists(path);
    return path;