Skip to content

Instantly share code, notes, and snippets.

@IuryAlves IuryAlves/vlc.py
Last active Dec 5, 2016

Embed
What would you like to do?
# coding: utf-8
import os
import sys
import commands
import codecs
import time
import subprocess
musica_process_output = subprocess.check_output("tasklist /V /FO list /FI \"IMAGENAME eq vlc.exe\"", shell=False)
musica = musica_process_output.split(":")
if not musica == " N/A":
mensagem = musica[len(musica) -1].replace(" ", "")
with codecs.open('musica.txt', 'w', encoding="utf-8") as arquivo:
arquivo.writelines(mensagem)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.