(path)
| 38 | |
| 39 | |
| 40 | def example__features_generator(path): |
| 41 | def make_gen(path): |
| 42 | return (ft for ft in mwm.Mwm(path)) |
| 43 | |
| 44 | cnt = 0 |
| 45 | print("Names of several first features:") |
| 46 | for ft in make_gen(path): |
| 47 | print(ft.names()) |
| 48 | if cnt == 5: |
| 49 | break |
| 50 | |
| 51 | cnt += 1 |
| 52 | |
| 53 | def return_ft(num): |
| 54 | cnt = 0 |
| 55 | for ft in mwm.Mwm(path): |
| 56 | if cnt == num: |
| 57 | return ft |
| 58 | |
| 59 | cnt += 1 |
| 60 | |
| 61 | print(return_ft(10)) |
| 62 | |
| 63 | |
| 64 | def example__sequential_processing(path): |