-#! /usr/bin/env python
+#! /usr/bin/env python -tt
# -*- coding: iso-8859-1 -*-
# This file is part of the LyX Documentation
# Copyright (C) 2004 José Matos <jamatos@lyx.org>
import sys
import os
-sys.path.insert(0,"../lyx2lyx")
+srcdir = os.path.dirname(sys.argv[0])
+if srcdir == '':
+ srcdir = '.'
+sys.path.insert(0, srcdir + "/../lyx2lyx")
+
import parser_tools
import LyX
import depend
# Determine existing translated documents for that language.
toc_general = []
- for file in depend.documents(pref):
+ for file in depend.documents(srcdir, pref):
file = LyX.File(input= file)
file.convert()
toc_general.extend(file.get_toc())