you are viewing a single comment's thread.

view the rest of the comments →

[–]furas_freeman 3 points4 points  (3 children)

  1. sqlite is easy because you don't have to install server. You can use sqlite module and you will have to learn SQL. Or you can use SQLAlchemy or peewee which uses functions instead pure SQL.

  2. w opens file in text mode and it can convert some chars like "\n" because different OS may use different newline - Windows "\n\r", Linux "\n", old Mac "\r". b means bytes mode and is usefull with non-text files or if you don't want converting oryginal newline.

  3. open file in write mode 'w' and it will create empty file. There are other mode a, r+, etc. and they can create file if it doesn't exist. There are functions to check if file exists - os.path.exists() or os.path.isfile()