-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_canta
executable file
·71 lines (55 loc) · 1.96 KB
/
run_canta
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#! /usr/bin/python -O
# -*- coding: utf-8 -*-
#
# CANTA - A free entertaining educational software for singing
# Copyright (C) 2007-2009 S. Huchler, A. Kattner, F. Lopez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import os
try:
import psyco
psyco.full()
except ImportError:
print '+ Canta + Warning: Psyco not found. Performance will not be optimized.'
pass
from canta.core import Core
def main():
# app name:
APP_NAME = 'Canta'
# app directory
APP_DIR = os.path.dirname(sys.argv[0])
# version:
#if os.path.exists(os.path.join(APP_DIR, 'VERSION')):
# version_file = open(os.path.join(APP_DIR, 'VERSION'))
# version = version_file.next()
#else:
# version = '(experimental)'
# version = '(experimental)'
version = '0.2.1'
# debug flag:
# python sets an own debug variable if you start python with the right parameter
# get platform info:
PLATFORM = sys.platform
# on Darwin systems:
if 'darwin' in PLATFORM:
from Authorization import Authorization, kAuthorizationFlagDestroyRights
# on Windows systems:
elif 'win32' in PLATFORM:
import PIL.PngImagePlugin
import PIL.JpegImagePlugin
# import win32com.client
window_title = APP_NAME + ' ' + version
Core(window_title, APP_DIR)
if __name__ == '__main__': main()