PyQt - How to open a directory folder?

前端 未结 6 2113
情歌与酒
情歌与酒 2021-01-19 06:03

I have searched a lot and I know how to open a directory dialog window. But what I am looking for is the method to open a directory folder under windows OS, just like you r

6条回答
  •  醉酒成梦
    2021-01-19 06:08

    You may simply try this:

    os.start(whatever_valid_filename)

    This starts the default OS application for whatever_valid_filename, meaning Explorer for a folder name, default notepad for a .txt file, etc.

提交回复
热议问题