Python 2.7 Python 2.7-子流程-添加到vlc播放列表

Python 2.7 Python 2.7-子流程-添加到vlc播放列表,python-2.7,debugging,subprocess,vlc,Python 2.7,Debugging,Subprocess,Vlc,我正在使用Python 2.7,并试图通过vlc(加载项播放列表)播放音频。我正在使用以下代码: from subprocess import Popen cmd = 'vlc.exe --started-from-file --playlist-enqueue "hello.mp3"' p = Popen(cmd) 该文件与代码位于同一位置。但我得到了一个错误: Traceback (most recent call last): File "C:/Users/Username/Des

我正在使用Python 2.7,并试图通过vlc(加载项播放列表)播放音频。我正在使用以下代码:

from subprocess import Popen

cmd = 'vlc.exe --started-from-file --playlist-enqueue "hello.mp3"'

p = Popen(cmd)
该文件与代码位于同一位置。但我得到了一个错误:

Traceback (most recent call last):

File "C:/Users/Username/Desktop/summa.py", line 4, in <module>
p = Popen(cmd)

File "C:\Python27\lib\subprocess.py", line 672, in __init__
    errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 882, in _execute_child
    startupinfo)

WindowsError: [Error 2] The system cannot find the file specified
回溯(最近一次呼叫最后一次):
文件“C:/Users/Username/Desktop/summa.py”,第4行,在
p=Popen(cmd)
文件“C:\Python27\lib\subprocess.py”,第672行,在\uuu init中__
错误读取,错误写入)
文件“C:\Python27\lib\subprocess.py”,第882行,在执行子进程中
startupinfo)
WindowsError:[错误2]系统找不到指定的文件

请帮我调试!谢谢

您的python文件具体在哪里?在
C:\Program Files\VideoLan\VLC
中,我的.py文件和“hello.mp3”文件在桌面上,那么
VLC.exe
呢?您可能希望使用完整路径