A comp.lang.python code snippet archive?

Remco Gerlich scarblac-spamtrap at pino.selwerd.nl
Mon Mar 6 12:12:01 CET 2000

Hans Nowak wrote in comp.lang.python:
> If I had a not too unreliable method to scan messages for Python code, that 
> would solve most of the problems (except that I still would like to get 
> some snippets from elsewhere). The # method (see my other post) does not 
> seem unacceptable; I tried it and most messages with # in them indeed have 
> some code or something looking like it. :)  Also some pseudocode, etc, but 
> I am not striving for a perfect way to do this. I think it's better than 
> scanning for reserved words.

How about this: look for lines that start with a keyword and end with :,
with the next line indented more than the current line.

That should catch almost all Python, and almost no text.


Remco Gerlich,  scarblac at pino.selwerd.nl
  1:11pm  up  1:32,  4 users,  load average: 0.18, 0.26, 0.21

More information about the Python-list mailing list