]>
git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blob - helpers/__init__.py
1 # -*- coding: utf-8 -*-
6 if getattr(sys
, 'frozen', False):
7 return sys
._MEIPASS
+ "/"
9 path
= os
.path
.dirname(os
.path
.realpath(__file__
))
17 if getattr(sys
, 'frozen', False):
18 f
= open(path() + ".pyinstaller_commit", "r")
19 print(f
.read(), end
="")
22 print("option '-v' can only be used in bundled package")
25 def duration_to_min_sec(duration
):
26 minutes
= int(duration
/ 60)
27 seconds
= int(duration
) % 60
29 return "{:2}:{:0>2}".format(minutes
, seconds
)
31 return "{}:{:0>2}".format(minutes
, seconds
)