-#! /usr/bin/env python
-# -*- coding: iso-8859-1 -*-
+# -*- coding: utf-8 -*-
# file tex_copy.py
# This file is part of LyX, the document processor.
# Full author contact details are available in file CREDITS
# Usage:
-# tex_copy.py from file> <to file> <latex name>
+# tex_copy.py <from file> <to file> <latex name>
# This script will copy a file <from file> to <to file>.
# <to file> is no exact copy of <from file>, but any occurence of <basename>
latex_base, latex_ext = os.path.splitext(latex_file)
# Read the input file and write the output file
+ if(not os.path.isfile(abs_from_file)):
+ error("%s is not a valid file.\n" % abs_from_file)
from_file = open(abs_from_file, 'rb')
to_file = open(abs_to_file, 'wb')
lines = from_file.readlines()