8000 Remove \ line breaks in file paths · SaBo85/python-basics-exercises@730c3de · GitHub
[go: up one dir, main page]

Skip to content

Commit 730c3de

Browse files
committed
Remove \ line breaks in file paths
1 parent dd6d58e commit 730c3de

File tree

7 files changed

+7
-14
lines changed
  • ch14-interact-with-pdf-files
  • ch17-scientific-computing-and-graphing
  • 7 files changed

    +7
    -14
    lines changed

    ch14-interact-with-pdf-files/1-extract-text-from-a-pdf.py

    Lines changed: 1 addition & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -18,8 +18,7 @@
    1818
    # We'll assume you downloaded the solutions folder and extracted it into
    1919
    # the home directory on your computer. If this is not the case, you'll
    2020
    # need to update the path below.
    21-
    pdf_path = Path.home() / "python-basics-exercises/" \
    22-
    "ch14-interact-with-pdf-files/practice_files/zen.pdf"
    21+
    pdf_path = Path.home() / "python-basics-exercises/ch14-interact-with-pdf-files/practice_files/zen.pdf"
    2322

    2423
    # Now you can create the PdfFileReader instance. Remember that
    2524
    # PdfFileReader objects can only be instantiated with path strings, not

    ch14-interact-with-pdf-files/2-extract-pages-from-a-pdf.py

    Lines changed: 1 addition & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -16,8 +16,7 @@
    1616
    # downloaded the solutions folder and extracted it into the home
    1717
    # directory on your computer. If this is not the case, you'll need to
    1818
    # update the path below.
    19-
    pdf_path = Path.home() / "python-basics-exercises/" \
    20-
    "ch14-interact-with-pdf-files/practice_files/Pride_and_Prejudice.pdf"
    19+
    pdf_path = Path.home() / "python-basics-exercises/ch14-interact-with-pdf-files/practice_files/Pride_and_Prejudice.pdf"
    2120

    2221
    # Now you can create the PdfFileReader instance. Remember that
    2322
    # PdfFileReader objects can only be instantiated with path strings, not

    ch14-interact-with-pdf-files/4-concatenating-and-merging-pdfs.py

    Lines changed: 1 addition & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -15,8 +15,7 @@
    1515
    from PyPDF2 import PdfFileMerger
    1616

    1717

    18-
    BASE_PATH = Path.home() / "python-basics-exercises/" \
    19-
    "ch14-interact-with-pdf-files/practice_files"
    18+
    BASE_PATH = Path.home() / "python-basics-exercises/ch14-interact-with-pdf-files/practice_files"
    2019

    2120
    pdf_paths = [BASE_PATH / "merge1.pdf", BASE_PATH / "merge2.pdf"]
    2221
    pdf_merger = PdfFileMerger()

    ch14-interact-with-pdf-files/5-rotating-and-cropping-pdf-pages.py

    Lines changed: 1 addition & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -15,8 +15,7 @@
    1515
    from PyPDF2 import PdfFileReader, PdfFileWriter
    1616

    1717

    18-
    pdf_path = Path.home() / "python-basics-exercises/" \
    19-
    "ch14-interact-with-pdf-files/practice_files/split_and_rotate.pdf"
    18+
    pdf_path = Path.home() / "python-basics-exercises/ch14-interact-with-pdf-files/practice_files/split_and_rotate.pdf"
    2019

    2120
    pdf_reader = PdfFileReader(str(pdf_path))
    2221
    pdf_writer = PdfFileWriter()

    ch14-interact-with-pdf-files/6-encrypting-and-decrypting-pdfs.py

    Lines changed: 1 addition & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -15,8 +15,7 @@
    1515
    from PyPDF2 import PdfFileReader, PdfFileWriter
    1616

    1717

    18-
    pdf_path = Path.home() / "python-basics-exercises/" \
    19-
    "ch14-interact-with-pdf-files/practice_files/top_secret.pdf"
    18+
    pdf_path = Path.home() / "python-basics-exercises/ch14-interact-with-pdf-files/practice_files/top_secret.pdf"
    2019

    2120
    pdf_reader = PdfFileReader(str(pdf_path))
    2221
    pdf_writer = PdfFileWriter()

    ch14-interact-with-pdf-files/7-challenge-unscramble-a-pdf.py

    Lines changed: 1 addition & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -10,8 +10,7 @@ def get_page_text(page):
    1010
    return page.extractText()
    1111

    1212

    13-
    pdf_path = Path.home() / "python-basics-exercises/" \
    14-
    "ch14-interact-with-pdf-files/practice_files/scrambled.pdf"
    13+
    pdf_path = Path.home() / "python-basics-exercises/ch14-interact-with-pdf-files/practice_files/scrambled.pdf"
    1514

    1615
    pdf_reader = PdfFileReader(str(pdf_path))
    1716
    pdf_writer = PdfFileWriter()

    ch17-scientific-computing-and-graphing/2-use-matplotlib-for-plotting-graphs.py

    Lines changed: 1 addition & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -8,8 +8,7 @@
    88
    import os
    99

    1010
    # Change `path` to actual path on your system
    11-
    path = "C:/Real Python/python-basics-exercises/ch16-scientific-computing-and-graphing/\
    12-
    practice_files"
    11+
    path = "C:/Real Python/python-basics-exercises/ch16-scientific-computing-and-graphing/practice_files"
    1312

    1413
    years = []
    1514
    temperatures = []

    0 commit comments

    Comments
     (0)
    0