Using Python Comments to Generate Markdown Anchors and Links.
- A completed install of
Python 3.x
. - The
.py
file with properly formatted comments.
Formatted Comments:
# Using function_name():
# Using an empty collection_type:
# Using collection_type with elements:
# Using collection_type Comprehension:
- Under your
USERPROFILE
, extract theusing-python-comments-to-generate-a-markdown-file-main.zip
.
Example:
C:\Users\nso89\using-python-comments-to-generate-a-markdown-main
- Open
cmd.exe
and change the folder to theusing-python-comments-to-generate-a-markdown-file-main
folder.
Example:
C:\Users\nso89>cd using-python-comments-to-generate-a-markdown-file-main
- Start the
main.py
script.
C:\Users\nso89\using-python-comments-to-generate-a-markdown-file-main>python main.py
- Suppose the path to your
.py
file isC:\Users\username\Projects\python-cheatsheet-main\using-example\example.py
, just provide the path without theUSERPROFILE
.
Example:
File Path: Projects\python-cheatsheet-main\using-example\example.py
- The
main.py
script generates theexample.md
file (the.md
file will be generated in the same folder as the.py
file).
Example:
C:\Users\nso89\Projects\python-cheatsheet-main\using-example\example.md