Skip to end of metadata
Go to start of metadata

Here are some samples of working with files in boo and .NET/Mono.

See also:

Labels
  • None
  1. Aug 05, 2007

    ...this post originally by bamboo...

    TextReader is considered to be enumerable in boo. So you can write things like:

    for line in File.OpenText("foo"):
    print line.ToUpper() if len(line) > 0

    Yep. Type inference works.

    I like how easy it is to grep:

    for index, line in File.OpenText("foo"):
    print "$