Skip to content

Commit 730c3de

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

7 files changed

+7
-14
lines changed

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

+1-2
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

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

+1-2
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

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

+1-2
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()

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

+1-2
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()

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

+1-2
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()

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

+1-2
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()

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

+1-2
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)