Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
import os File = open('Path/video_file.webm','rb') Size = os.path.getsize('Path/video_file.webm') Data = File.read(Size)
如何使用 python 播放“数据”中的内容而不是从文件中播放视频?请帮我。我卡住了。提前非常感谢。
Use StringIO
You can create a file from text using StringIO.StringIO(string) Then play it as you would normally
StringIO.StringIO(string)
Docs: http://docs.python.org/2/library/stringio.html