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:

  • No labels

1 Comment

  1. ...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 "$