Alain Boisvert, Québec, Canada, 2017-07-30.
Updated 2017-07-31: See section Check code for PEP8 requirements below.
Here is my first project for the "Full Stack Web Developer Nanodegree".
This repository contains a Python code to store a list of movies from my favorite film director and writer (Denis Villeneuve), including box art imagery and a movie trailer URL. This data is served as a web page allowing visitors to review their movies and watch the trailers.
This application contains three python files.
media.py
: This class provides a way to store movie related information.entertainment_center.py
: This code creates five movies instances of Denis Villeneuve, and executefresh_tomatoes.open_movies_page()
to display a movie website with these movies.fresh_tomatoes.py
: This Python module generate a website that displays these movies. This module comes from here.
I already knew Java and javascript. In this work, I learned the syntax of Python, where is the documentation, IDLE (Python's Integrated Development Environnement), how to submit a project in GitHub, etc.
This project is relatively easy since all the instructions found here.
Nevertheless, it took all my Sunday, but I'm happy with the result.
Among others, I applied the following syntax rules:
- Use 4 spaces per indentation level.
- Limit all lines to a maximum of 79 characters.
- Line break before a binary operator.
- Imports should usually be on separate lines.
I used the online PEP8 checker. I simply paste my code into this website, see the results, fix my code until the PEP8 check finds no errors.
Here, log file from online PEP8 checker.
However, I am not comfortable with the rule "line break before binary operator". Although I have corrected the problem indicated by PEP8 checker, I am rather of the same opinion with what is written here: Should a line break before or after a binary operator? and W503 enforces breaking after binary operators but PEP-8 appears to disagree.
Reviewer, what do you think about that? 😕
To run the application, you need to download the project and run entertainment_center.py
.
Here's what you should see on your screen.
Denis Villeneuve is a Canadian film director and writer. He is a four-time recipient of the Canadian Screen Award (formerly Genie Award) for Best Direction, for Maelström in 2001, Polytechnique in 2010, Incendies in 2011, and Enemy in 2013. See Wikipedia.
The contents of this repository are covered under the MIT License.