Open localfile using pyRevit

Hi,
Is there a way to open a localfile in pyRevit with ex. urlbutton or other?
In my case I want to open pdf or docx-files

Thanks in advanced

Python in Dynamo and pyrevit can do this in a few ways, but startfile is the most simple Iā€™d say.

You can see some options in the answers below. Noting pyRevit has its own forums so please use those in first instance for queries not directly related to Dynamo:

import os
os.startfile(filepath)
1 Like