File: __init__.py

package info (click to toggle)
krank 0.7%2Bdfsg2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 68,072 kB
  • sloc: python: 3,422; sh: 31; makefile: 11
file content (15 lines) | stat: -rw-r--r-- 444 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# levels/__init__.py

import k
from Krank import *
from Level import *

numLevels = 0
numBonusLevels = 0

for file in os.listdir(os.path.dirname(__file__)):
    if os.path.isfile(os.path.join(os.path.dirname(__file__), file)) and file[:5] == 'level' and file[-3:] == '.py':
        numLevels += 1
    if os.path.isfile(os.path.join(os.path.dirname(__file__), file)) and file[:5] == 'bonus' and file[-3:] == '.py':
        numBonusLevels += 1