diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-20 18:38:27 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-20 18:42:08 +0200 |
commit | decd597273c39311541bfd45ab71974f90dca9e6 (patch) | |
tree | e6cc6297a4a01e70b34ec311bb82c76c962c67a9 /tests/io/file-iter.py | |
parent | d54bef76921ae719bcbaf4ad7f9915da10f25574 (diff) | |
download | micropython-decd597273c39311541bfd45ab71974f90dca9e6.tar.gz micropython-decd597273c39311541bfd45ab71974f90dca9e6.zip |
unix io.FileIO: Add iteration support.
A file cannot be iterated concurrently, so we make io.FileIO its own
iterator.
Diffstat (limited to 'tests/io/file-iter.py')
-rw-r--r-- | tests/io/file-iter.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/io/file-iter.py b/tests/io/file-iter.py new file mode 100644 index 0000000000..48e8739966 --- /dev/null +++ b/tests/io/file-iter.py @@ -0,0 +1,3 @@ +f = open("io/data/file1") +for l in f: + print(l) |