Skip to content

Instantly share code, notes, and snippets.

@SKaplanOfficial
Last active November 15, 2022 01:31
Show Gist options
  • Save SKaplanOfficial/d18b8300a6c14d7f15ab491a947564e8 to your computer and use it in GitHub Desktop.
Save SKaplanOfficial/d18b8300a6c14d7f15ab491a947564e8 to your computer and use it in GitHub Desktop.
Using PyXA to list all paragraphs, words, and characters in all currently open TextEdit documents
# Test with PyXA 0.1.0
import PyXA
app = PyXA.Application("TextEdit")
documents = app.documents()
print("Paragraphs:", documents.paragraphs())
print("Words:", documents.words())
print("Characters:", documents.characters())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment