before csv
This commit is contained in:
parent
5496377fb6
commit
8b80b17baa
|
@ -1815,7 +1815,16 @@ if __name__ == "__main__":
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## csv, JSON and yaml
|
# Text based databases
|
||||||
|
|
||||||
|
The todo list example from before is handy but quite *limited* as a database.
|
||||||
|
As is it only holds one form or information and that is the *actual task*.
|
||||||
|
What if we want to add urgency or mark tasks complete (instead of deleting)?
|
||||||
|
This can be done by grouping data together.
|
||||||
|
We already saw a dictionaries which are good mapping structures but how can we save them to disk?
|
||||||
|
A hacky way would be to write a python file containing the `dict` and `import` it when we need it.
|
||||||
|
But there are better ways.
|
||||||
|
|
||||||
|
|
||||||
# Now for some useful scripting
|
# Now for some useful scripting
|
||||||
|
|
||||||
|
@ -1823,6 +1832,7 @@ With everything we have learned up until now you can start doing some interestin
|
||||||
Have a look at [these exercises](https://gitea.86thumbs.net/waldek/linux_course_doc/src/branch/master/modules/qualifying/exercise_python.md).
|
Have a look at [these exercises](https://gitea.86thumbs.net/waldek/linux_course_doc/src/branch/master/modules/qualifying/exercise_python.md).
|
||||||
You can try them out at your own pace.
|
You can try them out at your own pace.
|
||||||
I can give some hints or pointers if needed, either in class or individually.
|
I can give some hints or pointers if needed, either in class or individually.
|
||||||
|
Don't hesitate to ask for help!
|
||||||
|
|
||||||
# Creating our own classes
|
# Creating our own classes
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue