2021年4月24日星期六

In Python, what is the best way to open a folder in Explorer or its cross-platform equivalent?

I have a Blender template that I've publicly shared online, and I'm adding a Python script to it to perform a batch render. I'd like it to automatically open the output folder at some point, and my research tells me that os.startfile will do the job, but the problem is that only works on Windows. I want my script to be cross-platform, and have it open in Explorer, Finder, or whatever the default file manager is on the user's computer. I'd also rather not require any external dependencies that aren't available on a stock installation of Blender. How can I do this?

https://stackoverflow.com/questions/67248863/in-python-what-is-the-best-way-to-open-a-folder-in-explorer-or-its-cross-platfo April 25, 2021 at 09:07AM

没有评论:

发表评论