From fc8a2ae271bb3ddd3cff3da42dff990547a7bfa1 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 15 Dec 2021 11:17:55 -0800 Subject: Examples: Python ShellBang & Executable (#2673) * Examples: Python ShellBang & Executable Make sure that all PICMI scripts and all analysis Python scripts in `Examples/` are: - executable (`chmod a+x`) - start with a shell-bang to `python3` Now, all scripts can be run directly without a `python3 ...` prefix and also default to the only right executable of Python on older systems. (New systems always have a `python3` alias, too.) * Revert a moved numpy --- Examples/Tests/ParticleDataPython/PICMI_inputs_2d.py | 2 ++ Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py | 2 ++ Examples/Tests/ParticleDataPython/analysis.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 Examples/Tests/ParticleDataPython/PICMI_inputs_2d.py mode change 100644 => 100755 Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py (limited to 'Examples/Tests/ParticleDataPython') diff --git a/Examples/Tests/ParticleDataPython/PICMI_inputs_2d.py b/Examples/Tests/ParticleDataPython/PICMI_inputs_2d.py old mode 100644 new mode 100755 index 20a49eca7..6ed144dbc --- a/Examples/Tests/ParticleDataPython/PICMI_inputs_2d.py +++ b/Examples/Tests/ParticleDataPython/PICMI_inputs_2d.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + from pywarpx import picmi import numpy as np diff --git a/Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py b/Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py old mode 100644 new mode 100755 index c25b522af..d8e37140f --- a/Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py +++ b/Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # --- Input file to test the saving of old particle positions import numpy as np diff --git a/Examples/Tests/ParticleDataPython/analysis.py b/Examples/Tests/ParticleDataPython/analysis.py index e6fb64576..0b0cce329 100755 --- a/Examples/Tests/ParticleDataPython/analysis.py +++ b/Examples/Tests/ParticleDataPython/analysis.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/env python3 # Copyright 2021 Modern Electron # -- cgit v1.2.3