RPA自定义脚本打开文件夹

import os

import subprocess

from rpa.web.common.utils import convert_2_unicode

def startfile(filename):

    try:

        os.startfile(filename)

    except:

        subprocess.Popen(['xdg-open', filename])



start_directory = convert_2_unicode(start_directory)

startfile(start_directory)
posted @ 2019-12-12 16:31  JIAYIYAN  阅读(694)  评论(0编辑  收藏  举报