Rogi <r...@linuxmail.org> added the comment:

@mhammond

        Maybe its just me but it seems to be a really bad idea to let
those functions terminate your process as they wish. Teh programmer
should be allowed to control teh flow of his application.

        However, I am not teh only one affected by this. I recall seeing
blender crash when I typed raise(SystemExit) on its interactive console.
Teh new blender beta worked around this by UNDEFINING SystemExit, which,
to me, seems a UGLY HACK.

        If backwards compatibility is teh problem, things could still be
hacked to maintain it and achieve teh desired behaviour during
transition. For example, one could set a macro GOOD_BEHAVING_PYTHON and
obtain teh desired behaviour, without breaking old stuff. It's ugly but
it works.

        Teh new behaviour could be something liek that:

        ...
        #define GOOD_BEHAVING_PYTHON 1
        #include <Python.h>
        ...
        PyRun_SimpleString(...);

        /* allow programmer to do what he wants */

        /* if he wants to, he can do teh following */
        PyErr_Print();
        PyErr_Handle();
        ...

this way, Py_Main() could be implemented in a way it would return to its
caller instead of terminating teh process.

        Adn about my keyboadr, its not juts teh 'h' adn 'e' keys.

Cheers.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6498>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to