File: tutorial_02.py

package info (click to toggle)
doit 0.25.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,404 kB
  • ctags: 1,504
  • sloc: python: 11,084; makefile: 111; ansic: 14
file content (10 lines) | stat: -rw-r--r-- 276 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
def task_hello():
    """hello py """

    def python_hello(times, text, targets):
        with open(targets[0], "a") as output:
            output.write(times * text)

    return {'actions': [(python_hello, [3, "py!\n"])],
            'targets': ["hello.txt"],
            }