>>> "<<koristiti>> OS"- (THIS IS MY IMAGINARY EXAMPLE OF KEYWORD), >>> my program must write this code in some user file, but my >>> program must read this command like: "import os".How >>> can I do something like that?? >> The keywords are listed in Grammar/Grammar. You need to edit >> this file, then recompile. > > To clarify, are you suggesting changing the source code of the Python > implementation and recompiling it?
Correct. > If the keywords are changed in the Python executable, won't that break > the import of any Python module written for the standard keywords -- > such as many of those in the standard library? Most certainly, yes. > My understanding of the original poster's requirement was that the > keywords should be additional to, not replacement for, the existing > Python keywords. So he should make them additional in the grammar, too. It is entirely beyond me *why* the OP wants to do that, but changing the compiler would be the proper way of implementing that change. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list