forked from boyska/infissi
32 lines
666 B
Python
32 lines
666 B
Python
from subprocess import Popen, PIPE
|
|
|
|
|
|
class Giappo:
|
|
def __init__(self, symbol):
|
|
self.s = symbol
|
|
|
|
def __xor__(self, other):
|
|
return Giappo(self.s + other.s)
|
|
|
|
def __add__(self, other):
|
|
if other == [o_o]:
|
|
return Musicona('883.mp4')
|
|
|
|
class Musicona:
|
|
def __init__(self, url):
|
|
self.url = url
|
|
|
|
def __eq__(self, other):
|
|
if other == 883:
|
|
p = Popen(['mplayer', '-fs', self.url], stdout=PIPE, stderr=PIPE)
|
|
p.communicate()
|
|
|
|
class Musicassetta:
|
|
def __init__(self):
|
|
pass
|
|
|
|
d = Giappo('d')
|
|
b = Giappo('b')
|
|
_ = Giappo('_')
|
|
o_o = Musicassetta()
|
|
__all__ = ['d', '_', 'b', 'o_o']
|