tpaviot / pythonocc-demos

Examples and demos for the pythonocc CAD package
226 stars 119 forks source link

Make python script executable #23

Closed VictorLamoine closed 4 years ago

VictorLamoine commented 4 years ago

Just adding executable permission on the python files.

chmod +x examples/*.py run_examples_as_tests.py

VictorLamoine commented 4 years ago

Executing the scripts directly doesn't always work:

./core_geometry_airfoil.py
./core_geometry_airfoil.py: line 24: try:: command not found
import-im6.q16: attempt to perform an operation not allowed by the security policy `PS' @ error/constitute.c/IsCoderAuthorized/408.
./core_geometry_airfoil.py: line 26: except: command not found
import-im6.q16: attempt to perform an operation not allowed by the security policy `PS' @ error/constitute.c/IsCoderAuthorized/408.
from: can't read /var/mail/OCC.Core.BRepBuilderAPI
from: can't read /var/mail/OCC.Core.BRepPrimAPI
from: can't read /var/mail/OCC.Core.Geom2dAPI
from: can't read /var/mail/OCC.Core.GeomAPI
from: can't read /var/mail/OCC.Core.gp
from: can't read /var/mail/OCC.Core.TColgp
from: can't read /var/mail/OCC.Display.SimpleGui
from: can't read /var/mail/OCC.Extend.ShapeFactory
./core_geometry_airfoil.py: line 40: syntax error near unexpected token `('
./core_geometry_airfoil.py: line 40: `class UiucAirfoil(object):'

I have tried to modify the shebang to specify python3 but it does not help

So this might not be a good idea after all :confused: