Skip to content

Commit d0465df

Browse files
committed
add some structure to pyrilla package
1 parent 423e982 commit d0465df

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

examples/errors.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# -*- coding: utf-8 -*-
2+
from pyrilla.errors import SoundIOError, DeviceNotSupportedError
3+
from pyrilla import Manager, Sound
4+
5+
6+
def main():
7+
try:
8+
Manager(5)
9+
except DeviceNotSupportedError as err:
10+
print(str(err))
11+
12+
try:
13+
Sound("nonexisting.foo", "ridiculous")
14+
except SoundIOError as err:
15+
print(str(err))
16+
17+
18+
if __name__ == "__main__":
19+
main()

pyrilla/__init__.py

100644100755
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,10 @@
22

33
VERSION = (0, 0, 1) # PEP 386
44
__version__ = ".".join([str(x) for x in VERSION])
5+
6+
from pyrilla.core import (
7+
Sound,
8+
Voice,
9+
Mixer,
10+
Manager,
11+
)

pyrilla/errors.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
from pyrilla.core import (
3+
SoundIOError,
4+
DeviceNotSupportedError,
5+
)

0 commit comments

Comments
 (0)