"George Sakkis" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
On May 12, 7:35 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Ohad Frand" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> | I am looking for a way to programmically get a list of all python
> | existing statements that I cannot access by __builtins__ or locals()
> | (like ["assert","break","class",...])
>
> You appear to want the keywords that begin statements. Look at the 
> keyword
> list in the language reference and pick those you want. Then build that
> list into your program.

Someone already did it:

import keyword
print keyword.kwlist
=========================

I forgot about that.  However, I got the impression that the OP wants a 
subset, and if so, *that* will require hand selection. 



--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to