diff --git a/Alignment/MuonAlignment/python/geometryDiff.py b/Alignment/MuonAlignment/python/geometryDiff.py index 97ecef9476c8f..11509a4c49d9d 100755 --- a/Alignment/MuonAlignment/python/geometryDiff.py +++ b/Alignment/MuonAlignment/python/geometryDiff.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from Alignment.MuonAlignment.geometryXMLparser import MuonGeometry, dtorder, cscorder import sys, getopt diff --git a/Alignment/MuonAlignment/python/geometryXMLparser.py b/Alignment/MuonAlignment/python/geometryXMLparser.py index 186d6e734e533..c376cdcdd8f04 100644 --- a/Alignment/MuonAlignment/python/geometryXMLparser.py +++ b/Alignment/MuonAlignment/python/geometryXMLparser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # XML must come from MuonGeometryDBConverter; not hand-made # Example configuration that will work diff --git a/CalibTracker/SiStripESProducers/test/python/CheckAllIOVs.py b/CalibTracker/SiStripESProducers/test/python/CheckAllIOVs.py index 95cf550f21564..89e7d19c22c06 100755 --- a/CalibTracker/SiStripESProducers/test/python/CheckAllIOVs.py +++ b/CalibTracker/SiStripESProducers/test/python/CheckAllIOVs.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """ Helper functions for time conversions """ diff --git a/CondFormats/MFObjects/test/writeAllMagFieldConfigDB.py b/CondFormats/MFObjects/test/writeAllMagFieldConfigDB.py index c24ff1a5e63ed..e304cc7c95602 100755 --- a/CondFormats/MFObjects/test/writeAllMagFieldConfigDB.py +++ b/CondFormats/MFObjects/test/writeAllMagFieldConfigDB.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import os import sys diff --git a/DQMOffline/JetMET/test/publish/make_html_output.py b/DQMOffline/JetMET/test/publish/make_html_output.py index 31f2668b0b868..286fb31e03e33 100755 --- a/DQMOffline/JetMET/test/publish/make_html_output.py +++ b/DQMOffline/JetMET/test/publish/make_html_output.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -#!/usr/bin/python - import ROOT import sys,os,string,errno,shutil import code diff --git a/DQMServices/Diagnostic/scripts/Database/Python/WatchDog.sh b/DQMServices/Diagnostic/scripts/Database/Python/WatchDog.sh index 7044ab66c3528..edf2ce85745fe 100755 --- a/DQMServices/Diagnostic/scripts/Database/Python/WatchDog.sh +++ b/DQMServices/Diagnostic/scripts/Database/Python/WatchDog.sh @@ -12,7 +12,7 @@ Dir=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/HDQM/Cron/Scripts/RunSelection/Test PID=`ps ax | grep -v grep | grep "${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_StreamExpress.cfg" | awk '{print $1}'` if [ ! "${PID}" ]; then echo "HDQMDatabaseProducer.py for StreamExpress not running, restarting it at" `date` - /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_StreamExpress.cfg + /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_StreamExpress.cfg else echo "HDQMDatabaseProducer.py for StreamExpress still running at" `date` fi @@ -21,7 +21,7 @@ fi PID=`ps ax | grep -v grep | grep "${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_MinimumBias.cfg" | awk '{print $1}'` if [ ! "${PID}" ]; then echo "HDQMDatabaseProducer.py for MinimumBias not running, restarting it at" `date` - /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_MinimumBias.cfg + /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_MinimumBias.cfg else echo "HDQMDatabaseProducer.py for MinimumBias still running at" `date` fi @@ -30,7 +30,7 @@ fi PID=`ps ax | grep -v grep | grep "${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_Cosmics.cfg" | awk '{print $1}'` if [ ! "${PID}" ]; then echo "HDQMDatabaseProducer.py for Cosmics not running, restarting it at" `date` - /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_Cosmics.cfg + /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_Cosmics.cfg else echo "HDQMDatabaseProducer.py for Cosmics still running at" `date` fi @@ -53,12 +53,12 @@ if [ ! "${PID1}" ]; then if [ ! "${PIDRPC3}" ]; then echo "HDQMDatabaseProducer.py for StreamExpress not running, restarting it at" `date` - /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_StreamExpressRPC.cfg - /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_MinimumBiasRPC.cfg - /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_CosmicsRPC.cfg + /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_StreamExpressRPC.cfg + /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_MinimumBiasRPC.cfg + /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_CosmicsRPC.cfg fi fi fi fi fi -fi \ No newline at end of file +fi diff --git a/DQMServices/Diagnostic/scripts/Database/Python/WatchDog_singleJob.sh b/DQMServices/Diagnostic/scripts/Database/Python/WatchDog_singleJob.sh index 61e8c11e6e672..ebbc9e859d50a 100755 --- a/DQMServices/Diagnostic/scripts/Database/Python/WatchDog_singleJob.sh +++ b/DQMServices/Diagnostic/scripts/Database/Python/WatchDog_singleJob.sh @@ -13,7 +13,7 @@ Dir=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/HDQM/Cron/Scripts/RunSelection/Test # PID=`ps ax | grep -v grep | grep "${Dir}/HDQMDatabaseProducer.py" | awk '{print $1}'` # if [ ! "${PID}" ]; then # echo "HDQMDatabaseProducer.py for StreamExpress not running, restarting it at" `date` -# /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_StreamExpress.cfg +# /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_StreamExpress.cfg # else # echo "HDQMDatabaseProducer.py for StreamExpress still running at" `date` # fi @@ -23,7 +23,7 @@ Dir=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/HDQM/Cron/Scripts/RunSelection/Test # PID=`ps ax | grep -v grep | grep "${Dir}/HDQMDatabaseProducer.py" | awk '{print $1}'` # if [ ! "${PID}" ]; then # echo "HDQMDatabaseProducer.py for MinimumBias not running, restarting it at" `date` -# /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_MinimumBias.cfg +# /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_MinimumBias.cfg # else # echo "HDQMDatabaseProducer.py for MinimumBias still running at" `date` # fi @@ -33,7 +33,7 @@ Dir=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/HDQM/Cron/Scripts/RunSelection/Test # PID=`ps ax | grep -v grep | grep "${Dir}/HDQMDatabaseProducer.py" | awk '{print $1}'` # if [ ! "${PID}" ]; then # echo "HDQMDatabaseProducer.py for Cosmics not running, restarting it at" `date` -# /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_Cosmics.cfg +# /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_Cosmics.cfg # else # echo "HDQMDatabaseProducer.py for Cosmics still running at" `date` # fi @@ -42,9 +42,9 @@ PID=`ps ax | grep -v grep | grep "${Dir}/HDQMDatabaseProducer.py" | awk '{print echo "PID = ${PID}" if [ ! "${PID}" ]; then echo "HDQMDatabaseProducer.py not running, starting it at" `date` - /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_StreamExpress.cfg - /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_MinimumBias.cfg - /usr/bin/python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_Cosmics.cfg + /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_StreamExpress.cfg + /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_MinimumBias.cfg + /usr/bin/env python ${Dir}/HDQMDatabaseProducer.py ${Dir}/HDQMDatabaseProducerConfiguration_Cosmics.cfg else echo "HDQMDatabaseProducer.py still running at" `date` fi diff --git a/HLTrigger/HLTanalyzers/test/CreateCFGs.py b/HLTrigger/HLTanalyzers/test/CreateCFGs.py index c6a2f8d6408e0..f67f8e5c0fb49 100755 --- a/HLTrigger/HLTanalyzers/test/CreateCFGs.py +++ b/HLTrigger/HLTanalyzers/test/CreateCFGs.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # import sys,string,time,os diff --git a/HLTrigger/HLTanalyzers/test/CreateFileLists.py b/HLTrigger/HLTanalyzers/test/CreateFileLists.py index e22daf5f1e07c..5d7843a788a2a 100755 --- a/HLTrigger/HLTanalyzers/test/CreateFileLists.py +++ b/HLTrigger/HLTanalyzers/test/CreateFileLists.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # import sys,string,time,os diff --git a/HLTrigger/HLTanalyzers/test/RateEff/findL1SeedsFromHLThtml.py b/HLTrigger/HLTanalyzers/test/RateEff/findL1SeedsFromHLThtml.py index 8683b6207f93c..862f5a4482721 100755 --- a/HLTrigger/HLTanalyzers/test/RateEff/findL1SeedsFromHLThtml.py +++ b/HLTrigger/HLTanalyzers/test/RateEff/findL1SeedsFromHLThtml.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import sys,HTMLTableParser diff --git a/HLTrigger/HLTanalyzers/test/RateEff/printPathsFromHLThtml.py b/HLTrigger/HLTanalyzers/test/RateEff/printPathsFromHLThtml.py index 811d2672cecf9..07f88c425f25a 100755 --- a/HLTrigger/HLTanalyzers/test/RateEff/printPathsFromHLThtml.py +++ b/HLTrigger/HLTanalyzers/test/RateEff/printPathsFromHLThtml.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #import pprint import sys,HTMLTableParser diff --git a/HLTrigger/HLTanalyzers/test/rates/findL1SeedsFromHLThtml.py b/HLTrigger/HLTanalyzers/test/rates/findL1SeedsFromHLThtml.py index 8683b6207f93c..862f5a4482721 100755 --- a/HLTrigger/HLTanalyzers/test/rates/findL1SeedsFromHLThtml.py +++ b/HLTrigger/HLTanalyzers/test/rates/findL1SeedsFromHLThtml.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import sys,HTMLTableParser diff --git a/HLTrigger/HLTanalyzers/test/rates/printPathsFromHLThtml.py b/HLTrigger/HLTanalyzers/test/rates/printPathsFromHLThtml.py index 811d2672cecf9..07f88c425f25a 100755 --- a/HLTrigger/HLTanalyzers/test/rates/printPathsFromHLThtml.py +++ b/HLTrigger/HLTanalyzers/test/rates/printPathsFromHLThtml.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #import pprint import sys,HTMLTableParser diff --git a/RecoLuminosity/LumiDB/scripts/lumiDBFiller.py b/RecoLuminosity/LumiDB/scripts/lumiDBFiller.py index 74ef791aba0c7..d4129f0f3e03b 100755 --- a/RecoLuminosity/LumiDB/scripts/lumiDBFiller.py +++ b/RecoLuminosity/LumiDB/scripts/lumiDBFiller.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!/usr/bin/env python import string, os, time,re import commands diff --git a/RecoLuminosity/LumiDB/test/loadValidationByDir.py b/RecoLuminosity/LumiDB/test/loadValidationByDir.py index bad210660b201..bc7520d54cd7b 100755 --- a/RecoLuminosity/LumiDB/test/loadValidationByDir.py +++ b/RecoLuminosity/LumiDB/test/loadValidationByDir.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!/usr/bin/env python import os,os.path,sys,fnmatch,commands dbname='oracle://cms_orcon_prod/cms_lumi_prod' authpath='/home/lumidb/auth/writer' diff --git a/Utilities/RelMon/python/web/app_utils.py b/Utilities/RelMon/python/web/app_utils.py index 5e31a67d75cd9..f6b053383f9a1 100755 --- a/Utilities/RelMon/python/web/app_utils.py +++ b/Utilities/RelMon/python/web/app_utils.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!/usr/bin/env python # coding: utf-8 ''' Helper functions for CherryPy application ``browse_db.py``. diff --git a/Utilities/RelMon/python/web/browse_db.py b/Utilities/RelMon/python/web/browse_db.py index 711c319a38285..9dac54a7cde10 100755 --- a/Utilities/RelMon/python/web/browse_db.py +++ b/Utilities/RelMon/python/web/browse_db.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!/usr/bin/env python # coding: utf-8 ''' CherryPy application, which enables dynamic SQLite3 database file with release diff --git a/Utilities/RelMon/python/web/dbfile2html.py b/Utilities/RelMon/python/web/dbfile2html.py index 91e315eddab1a..22822589e5930 100755 --- a/Utilities/RelMon/python/web/dbfile2html.py +++ b/Utilities/RelMon/python/web/dbfile2html.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!/usr/bin/env python # coding: utf-8 ''' Generates static HTML for the given database file. diff --git a/Validation/CaloTowers/test/macros/RelValHarvest.py b/Validation/CaloTowers/test/macros/RelValHarvest.py index 1d85917df23e7..35d3cc2498185 100755 --- a/Validation/CaloTowers/test/macros/RelValHarvest.py +++ b/Validation/CaloTowers/test/macros/RelValHarvest.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import sys, os diff --git a/Validation/Performance/scripts/cmsBenchmark.py b/Validation/Performance/scripts/cmsBenchmark.py index d85b43cfd70b0..3069a3e5ebebc 100755 --- a/Validation/Performance/scripts/cmsBenchmark.py +++ b/Validation/Performance/scripts/cmsBenchmark.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """ Usage: ./cmsBenchmark.py [options] diff --git a/Validation/RecoEgamma/test/makeWebpage.py b/Validation/RecoEgamma/test/makeWebpage.py index 5ce016749f504..db3bbb9ffb278 100755 --- a/Validation/RecoEgamma/test/makeWebpage.py +++ b/Validation/RecoEgamma/test/makeWebpage.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python ## This script writes an index.html page ## displaying all plots contained in the