New gpaw python
This replaces Py_Main()
with our own mechanism.
The problem with Py_Main
is that we do not have complete freedom: If we perform imports and other actions before calling Py_Main
, the behaviour is unpredictable.
As of this change, we can add our own initialization and finalization code without bothering about undefined behaviour. This paves the way for broadcast imports, proper command-line argument handling (gpaw-python [OPTION...] myscript.py [OPTION...]
) and start-up hooks in general.