From 373a733fc9ff959dab5e0547cf154a2b62999de3 Mon Sep 17 00:00:00 2001 From: Panagiotis Cheilaris Date: Tue, 4 Jun 2013 09:50:34 +0200 Subject: [PATCH] make script python version agnostic --- Scripts/developer_scripts/cgal_create_package_dir.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Scripts/developer_scripts/cgal_create_package_dir.py b/Scripts/developer_scripts/cgal_create_package_dir.py index bd64c27e881..c5076726c24 100755 --- a/Scripts/developer_scripts/cgal_create_package_dir.py +++ b/Scripts/developer_scripts/cgal_create_package_dir.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # This script creates the directory structure for a new package. # Usage: cgal_create_package_dir.py Package_name @@ -191,6 +191,7 @@ if re.match("^[A-Za-z_][A-Za-z0-9_]*$", packagename): if os.path.exists(figfile): shutil.copy(figfile, figpath) else: - print "Error: Bad package name:", packagename - print "The package name should consist of:" - print "letters, digits and underscores and not start with a digit." + sys.stderr.write("Error: Bad package name: " + packagename + '\n') + sys.stderr.write("The package name should consist of:" + '\n') + sys.stderr.write \ + ("letters, digits and underscores and not start with a digit." + '\n')