René's URL Explorer Experiment


Title: Draw the Solution (Video) – Real Python

Open Graph Title: Draw the Solution – Real Python

Description: Drawing the Solution. The last missing method in the SVGRenderer class is one that draws a solution as a line ending with an arrow marker. You transform the squares of the solution to get their corresponding pixel coordinates. Notice that you add an…

Open Graph Description: Drawing the Solution. The last missing method in the SVGRenderer class is one that draws a solution as a line ending with an arrow marker. You transform the squares of the solution to get their corresponding pixel coordinates. Notice that you add an…

Opengraph URL: https://realpython.com/lessons/draw-python-maze-solution/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
  {
    "@context": "https://schema.org",
    "@type": "VideoObject",
    "name": "Draw the Solution",
    "description": "Drawing the Solution. The last missing method in the SVGRenderer class is one that draws a solution as a line ending with an arrow marker. You transform the squares of the solution to get their corresponding pixel coordinates. Notice that you add an…",
    "thumbnailUrl": ["https://files.realpython.com/media/Build-a-Pac-Man-Maze-Solver-in-Python_Watermarked.c2e79a85fc99.jpg"],
    "uploadDate": "2023-06-06T14:00:00+00:00",
    "duration": "PT3M13S",
    
    "potentialAction": {
      "@type": "SeekToAction",
      "target": "https://realpython.com/lessons/draw-python-maze-solution/#t={seek_to_second_number}",
      "startOffset-input": "required name=seek_to_second_number"
    }
  }
  

authorReal Python
theme-color#18354c
color-schemelight dark
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/Build-a-Pac-Man-Maze-Solver-in-Python_Watermarked.c2e79a85fc99.jpg
og:imagehttps://files.realpython.com/media/Build-a-Pac-Man-Maze-Solver-in-Python_Watermarked.c2e79a85fc99.jpg
twitter:creator@realpython
og:typevideo.episode
og:site_nameReal Python
apple-mobile-web-app-titleReal Python

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/lessons/draw-python-maze-solution/
Your Learning Plan →Your personalized Python learning planhttps://realpython.com/account/learning-plan/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest&_from=nav_library
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/search?kind=exercise&kind=quiz&_from=nav_library
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Mentor AI →NewYour personal Python mentorhttps://realpython.com/mentor/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Live Courses →Live, instructor-led Python courseshttps://realpython.com/live/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Unlock All Content and Become a Python Expert →Get unlimited access to all Real Python has to offerhttps://realpython.com/account/join/?from=navbar_learn
Unlock All Content →Become a Python Experthttps://realpython.com/account/join/?from=navbar_learn
More https://realpython.com/lessons/draw-python-maze-solution/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Contributorhttps://realpython.com/jobs/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?intent=navbar&next=%2Flessons%2Fdraw-python-maze-solution%2F
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson&utm_content=python-maze-solver
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson&utm_content=python-maze-solver
https://realpython.com/courses/python-maze-solver/#team
Mazes in Python: Build, Visualize, Store, and Solvehttps://realpython.com/courses/python-maze-solver/
Darren Joneshttps://realpython.com/courses/python-maze-solver/#team
Recommended Tutorialhttps://realpython.com/python-maze-solver/
Course Slides (.pdf)https://realpython.com/courses/python-maze-solver/downloads/mazes-in-python-slides/
Sample Code (.zip)https://realpython.com/courses/python-maze-solver/downloads/mazes-in-python-code/
Ask a Questionhttps://realpython.com/lessons/draw-python-maze-solution/#discussion
https://realpython.com/feedback/survey/course/python-maze-solver/liked/?from=lesson-title
https://realpython.com/feedback/survey/course/python-maze-solver/disliked/?from=lesson-title
Contentshttps://realpython.com/lessons/draw-python-maze-solution/#description
Transcripthttps://realpython.com/lessons/draw-python-maze-solution/#transcript
Discussionhttps://realpython.com/lessons/draw-python-maze-solution/#discussion
00:00https://realpython.com/lessons/draw-python-maze-solution/#t=0.47
Drawing the Solution.https://realpython.com/lessons/draw-python-maze-solution/#t=0.47
The last missing method in the SVGRenderer class is one that draws ahttps://realpython.com/lessons/draw-python-maze-solution/#t=4.47
solution as a line ending with an arrow marker.https://realpython.com/lessons/draw-python-maze-solution/#t=8.81
00:39https://realpython.com/lessons/draw-python-maze-solution/#t=39.13
You transform the squares of the solution to get their corresponding pixelhttps://realpython.com/lessons/draw-python-maze-solution/#t=39.13
coordinates.https://realpython.com/lessons/draw-python-maze-solution/#t=42.5
Notice that you add an extra offset to center the solution’s line vertically andhttps://realpython.com/lessons/draw-python-maze-solution/#t=45.29
horizontally in each square,https://realpython.com/lessons/draw-python-maze-solution/#t=49.51
01:07https://realpython.com/lessons/draw-python-maze-solution/#t=67.18
the marker-end SVG attribute refers to the SVG object identified ashttps://realpython.com/lessons/draw-python-maze-solution/#t=67.18
#arrow, which you defined earlier.https://realpython.com/lessons/draw-python-maze-solution/#t=72.16
At this point,https://realpython.com/lessons/draw-python-maze-solution/#t=78.52
you can print the resulting SVG in the console or save its XML content to ahttps://realpython.com/lessons/draw-python-maze-solution/#t=79.36
local file.https://realpython.com/lessons/draw-python-maze-solution/#t=83.7
01:24https://realpython.com/lessons/draw-python-maze-solution/#t=84.272
You’ll make use of the maze you saved earlier in the course here,https://realpython.com/lessons/draw-python-maze-solution/#t=84.272
so ensure that your REPL session starts at the same level as the pyproject.tomlhttps://realpython.com/lessons/draw-python-maze-solution/#t=87.76
file to ensure that the relative import of the mini_maze works correctly.https://realpython.com/lessons/draw-python-maze-solution/#t=92.0
01:37https://realpython.com/lessons/draw-python-maze-solution/#t=97.74
First, you import the mini_maze, which was created earlier,https://realpython.com/lessons/draw-python-maze-solution/#t=97.74
and then Path from pathlib to make creation of the filehttps://realpython.com/lessons/draw-python-maze-solution/#t=101.49
smpler.https://realpython.com/lessons/draw-python-maze-solution/#t=104.3
01:44https://realpython.com/lessons/draw-python-maze-solution/#t=104.763
The Solution and SVGRenderer are imported from thehttps://realpython.com/lessons/draw-python-maze-solution/#t=104.763
maze_solver project …https://realpython.com/lessons/draw-python-maze-solution/#t=109.25
01:58https://realpython.com/lessons/draw-python-maze-solution/#t=118.03
and then a solution is manually created.https://realpython.com/lessons/draw-python-maze-solution/#t=118.03
An SVGRenderer object is created with the maze and solution as arguments.https://realpython.com/lessons/draw-python-maze-solution/#t=127.38
And finally, the file is written to disk.https://realpython.com/lessons/draw-python-maze-solution/#t=134.73
02:28https://realpython.com/lessons/draw-python-maze-solution/#t=148.22
This will save the rendered maze and your manually built solution in a file namedhttps://realpython.com/lessons/draw-python-maze-solution/#t=148.22
maze.svg,https://realpython.com/lessons/draw-python-maze-solution/#t=152.06
which you can open using an external editor or viewer.https://realpython.com/lessons/draw-python-maze-solution/#t=154.04
02:41https://realpython.com/lessons/draw-python-maze-solution/#t=161.82
You should see something similar to what’s seen on-screen,https://realpython.com/lessons/draw-python-maze-solution/#t=161.82
but bear in mind that the rendering will look different depending on how youhttps://realpython.com/lessons/draw-python-maze-solution/#t=164.54
open it.https://realpython.com/lessons/draw-python-maze-solution/#t=167.92
On-screen,https://realpython.com/lessons/draw-python-maze-solution/#t=169.135
you can see the difference when opening in Firefox and Inkscape, and which one youhttps://realpython.com/lessons/draw-python-maze-solution/#t=170.64
prefer will be personal choice.https://realpython.com/lessons/draw-python-maze-solution/#t=174.78
02:59https://realpython.com/lessons/draw-python-maze-solution/#t=179.22
What is beyond debate is that it would be much more convenient to have a .preview()https://realpython.com/lessons/draw-python-maze-solution/#t=179.22
method on the SVG instance that you could call directly to have the imagehttps://realpython.com/lessons/draw-python-maze-solution/#t=182.82
displayed to you.https://realpython.com/lessons/draw-python-maze-solution/#t=187.02
03:08https://realpython.com/lessons/draw-python-maze-solution/#t=188.36
You’ll implement that method in the next section of the course.https://realpython.com/lessons/draw-python-maze-solution/#t=188.36
Become a Memberhttps://realpython.com/account/join/
https://realpython.com/lessons/python-maze-renderer-features/
Overviewhttps://realpython.com/courses/python-maze-solver/
https://realpython.com/lessons/preview-python-maze/
Mazes in Python: Build and Visualize 02:47 https://realpython.com/videos/python-maze-solver-part-1-overview/
Check Out What You'll Make 02:39 https://realpython.com/videos/python-maze-solver-project/
Lay the Groundwork 04:02 https://realpython.com/videos/python-maze-solver-groundwork/
Scaffold the Project Structure 04:50 https://realpython.com/lessons/python-maze-solver-structure/
Represent the Maze With Objects 06:37 https://realpython.com/lessons/represent-maze-with-objects/
Create Border Patterns 06:32 https://realpython.com/lessons/python-maze-border-patterns/
Model the Square 02:25 https://realpython.com/lessons/model-python-maze-square/
Build the Maze 09:07 https://realpython.com/lessons/build-python-maze/
Visualize the Maze With SVG 04:45 https://realpython.com/lessons/python-maze-svg/
Implement Geometric Primitives 04:48 https://realpython.com/lessons/python-maze-geometric-primitives/
Add More Primitives 03:47 https://realpython.com/lessons/python-maze-more-primitives/
Decompose the Border Into Primitives 04:41 https://realpython.com/lessons/decompose-python-maze-border/
Add More Border Patterns 03:58 https://realpython.com/lessons/python-maze-more-border-patterns/
Build the SVG Renderer 03:49 https://realpython.com/lessons/python-maze-svg-renderer/
Add Features to the Renderer 06:50 https://realpython.com/lessons/python-maze-renderer-features/
Draw the Solution 03:13 https://realpython.com/lessons/draw-python-maze-solution/
Preview the Rendered Maze and Its Solution 04:56 https://realpython.com/lessons/preview-python-maze/
Mazes in Python: Build and Visualize (Recap) 01:14 https://realpython.com/lessons/python-maze-solver-part-1-summary/
Mazes in Python: Store and Solve 01:48 https://realpython.com/videos/python-maze-solver-part-2-overview/
Load the Maze From a Binary File 04:55 https://realpython.com/videos/python-maze-binary-file/
Choose Your Data Alignment 05:09 https://realpython.com/videos/python-maze-data-alignment/
Define the File Header and Body 08:12 https://realpython.com/lessons/python-maze-file-header-and-body/
Serialize the Maze 05:22 https://realpython.com/lessons/serialize-python-maze/
Deserialize the Maze 04:32 https://realpython.com/lessons/deserialize-python-maze/
Make the Maze Self-Contained 04:30 https://realpython.com/lessons/python-self-contained-maze/
Update the Maze Class 03:16 https://realpython.com/lessons/python-maze-class/
Solve the Maze Using a Graph-Based Approach 03:01 https://realpython.com/lessons/solve-python-maze-graph-based/
Transform the Maze Into a Graph 07:06 https://realpython.com/lessons/transform-python-maze-graph/
Find the Shortest Path 05:23 https://realpython.com/lessons/python-maze-shortest-path/
Add Weights to Graph Edges 02:36 https://realpython.com/lessons/python-map-weights-graph-edges/
Introduce Enemies and Rewards 06:04 https://realpython.com/lessons/python-maze-enemies-rewards/
Make a Runnable Script 03:59 https://realpython.com/lessons/python-maze-runnable-script/
Mazes in Python: Store and Solve (Recap) 01:23 https://realpython.com/lessons/python-maze-solver-part-2-summary/
Privacy Policyhttps://realpython.com/privacy-policy/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.