Updated Answer
From your comments, it seems that the Python app doesn't actually need to know the outcome of the user's check of the PDF, just that it needs to know when he has finished checking.
AFAIK, the easiest way is to use the scripting functionality of TextEdit to ask it for a list of the open documents every second or so. Then you could wait until the user closes the document you opened for him and it will disappear from the list.
The script could look something like this, called GetTextEditDocumentList:
#!/bin/bash
osascript -e 'tell app "TextEdit" to get documents'
It will print a list of open documents on its stdout which you can read with Python. Or you could pass it a filename as a parameter and it could loop, with say a 1 second delay in the middle, until that file/document is no longer open.
You can just try it in the terminal while you open and close a few documents with TextEdit to see how it works.
Original Answer
You appear to be trying to use TextEdit to get some text (a commentary maybe) about a PDF visible in Preview, when a text entry dialog box might be more appropriate.
Whilst you could install, and force any user to install Tkinter or wxPython, you can actually do that very simply using Applescript which is already built into macOS without needing to install anything.
So, save the following as dialog:
#!/bin/bash
input=$(osascript <<EOF
tell application "System Events"
display dialog "Enter something:" default answer "Some default answer" with title "Gimme da thing" buttons {"Okey dokey"}
end tell
EOF
)
echo $input
And make it executable with:
chmod +x dialog
Then it will pop up a dialog box like this:

And the output is:
./dialog
button returned:Okey dokey, text returned:No, I refuse
Then you can very simply call this from Python, using:
subprocess.Popen(['dialog'],stdout=subprocess.PIPE)
Of course, you could parameterize the title, prompt and default text and pass those to the script if you need to be more flexible than the static title I made up.