meme-errors 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- meme_errors-0.1.0/MANIFEST.in +1 -0
- meme_errors-0.1.0/PKG-INFO +110 -0
- meme_errors-0.1.0/README.md +95 -0
- meme_errors-0.1.0/meme_errors.egg-info/PKG-INFO +110 -0
- meme_errors-0.1.0/meme_errors.egg-info/SOURCES.txt +9 -0
- meme_errors-0.1.0/meme_errors.egg-info/dependency_links.txt +1 -0
- meme_errors-0.1.0/meme_errors.egg-info/requires.txt +2 -0
- meme_errors-0.1.0/meme_errors.egg-info/top_level.txt +1 -0
- meme_errors-0.1.0/pyproject.toml +3 -0
- meme_errors-0.1.0/setup.cfg +29 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include meme_errors/sounds *.mp3
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: meme-errors
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Play funny meme sounds when Python errors occur!
|
|
5
|
+
Home-page: https://github.com/JAY-MU-4098/meme_errors
|
|
6
|
+
Author: Jay Gogra
|
|
7
|
+
Author-email: pyex1.1@gmail.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.7
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: pygame
|
|
14
|
+
Requires-Dist: pydub
|
|
15
|
+
|
|
16
|
+
# Meme Errors
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Play funny meme sounds whenever Python exceptions occur — **even if the error is handled!** Customize your sounds per exception type, set trim duration, and enjoy some chaotic developer humor.
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
* **Automatic memes** on uncaught exceptions.
|
|
24
|
+
* **Handled exceptions support** via decorator or context manager.
|
|
25
|
+
* **Custom sounds** per exception type.
|
|
26
|
+
* **Automatic trimming** of long sounds (default 3 seconds).
|
|
27
|
+
* **Optional custom duration** per error or decorator.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install meme-errors
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Use code with caution. Usage Global Uncaught Errors Automatically plays a meme when an exception occurs that is not handled:
|
|
38
|
+
```
|
|
39
|
+
import meme_errors
|
|
40
|
+
|
|
41
|
+
# This will play the default Exception meme
|
|
42
|
+
1 / 0 # Division by zero
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
Custom Memes for Specific Exceptions
|
|
47
|
+
```
|
|
48
|
+
import meme_errors
|
|
49
|
+
|
|
50
|
+
# Set a custom meme for TypeError
|
|
51
|
+
meme_errors.set_error_sound(TypeError, "/path/to/emotional-damage-meme.mp3")
|
|
52
|
+
|
|
53
|
+
# Set a custom meme for FileNotFoundError
|
|
54
|
+
meme_errors.set_error_sound(FileNotFoundError, "/path/to/galaxy-meme.mp3")
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Handled Exceptions Using a Decorator
|
|
58
|
+
```
|
|
59
|
+
from meme_errors import meme_sound_on_error
|
|
60
|
+
|
|
61
|
+
@meme_sound_on_error
|
|
62
|
+
def risky_func():
|
|
63
|
+
try:
|
|
64
|
+
open("missing_file.txt") # FileNotFoundError
|
|
65
|
+
except FileNotFoundError:
|
|
66
|
+
print("Caught the error, but meme still plays!")
|
|
67
|
+
|
|
68
|
+
risky_func()
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Custom Duration for Decorator
|
|
72
|
+
```
|
|
73
|
+
# Set duration to 5 seconds
|
|
74
|
+
risky_func = meme_sound_on_error(risky_func, duration_ms=5000)
|
|
75
|
+
```
|
|
76
|
+
Manual Meme Playback
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
from meme_errors import play_meme_sound
|
|
80
|
+
|
|
81
|
+
# Play TypeError meme for default 3 seconds
|
|
82
|
+
play_meme_sound(TypeError)
|
|
83
|
+
|
|
84
|
+
# Play TypeError meme for 5 seconds
|
|
85
|
+
play_meme_sound(TypeError, duration_ms=5000)
|
|
86
|
+
```
|
|
87
|
+
Default Memes Included:
|
|
88
|
+
|
|
89
|
+
| Exception Type | Default Meme File |
|
|
90
|
+
|-----------------------|----------------------------------------|
|
|
91
|
+
| TypeError | emotional-damage-meme.mp3 |
|
|
92
|
+
| FileNotFoundError | galaxy-meme.mp3 |
|
|
93
|
+
| Exception (fallback) | meme-de-creditos-finales.mp3 |
|
|
94
|
+
|
|
95
|
+
You can replace these using `set_error_sound()`.
|
|
96
|
+
|
|
97
|
+
## Notes:
|
|
98
|
+
|
|
99
|
+
- **Audio Trimming:** Audio is trimmed to a default of 3 seconds to prevent long playback.
|
|
100
|
+
- **Compatibility:** Works on Windows, macOS, and Linux (requires `playsound` and `pydub`).
|
|
101
|
+
- **Non-blocking:** Playback is handled via `playsound`.
|
|
102
|
+
|
|
103
|
+
## License:
|
|
104
|
+
|
|
105
|
+
MIT License – see [LICENSE](LICENSE) file.
|
|
106
|
+
|
|
107
|
+
## Contributing:
|
|
108
|
+
|
|
109
|
+
Fork the repo, add your own meme sounds or improve features, and submit a Pull Request.
|
|
110
|
+
Have fun making Python errors **hilarious!** 😂
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Meme Errors
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
Play funny meme sounds whenever Python exceptions occur — **even if the error is handled!** Customize your sounds per exception type, set trim duration, and enjoy some chaotic developer humor.
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
* **Automatic memes** on uncaught exceptions.
|
|
9
|
+
* **Handled exceptions support** via decorator or context manager.
|
|
10
|
+
* **Custom sounds** per exception type.
|
|
11
|
+
* **Automatic trimming** of long sounds (default 3 seconds).
|
|
12
|
+
* **Optional custom duration** per error or decorator.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install meme-errors
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Use code with caution. Usage Global Uncaught Errors Automatically plays a meme when an exception occurs that is not handled:
|
|
23
|
+
```
|
|
24
|
+
import meme_errors
|
|
25
|
+
|
|
26
|
+
# This will play the default Exception meme
|
|
27
|
+
1 / 0 # Division by zero
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
Custom Memes for Specific Exceptions
|
|
32
|
+
```
|
|
33
|
+
import meme_errors
|
|
34
|
+
|
|
35
|
+
# Set a custom meme for TypeError
|
|
36
|
+
meme_errors.set_error_sound(TypeError, "/path/to/emotional-damage-meme.mp3")
|
|
37
|
+
|
|
38
|
+
# Set a custom meme for FileNotFoundError
|
|
39
|
+
meme_errors.set_error_sound(FileNotFoundError, "/path/to/galaxy-meme.mp3")
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Handled Exceptions Using a Decorator
|
|
43
|
+
```
|
|
44
|
+
from meme_errors import meme_sound_on_error
|
|
45
|
+
|
|
46
|
+
@meme_sound_on_error
|
|
47
|
+
def risky_func():
|
|
48
|
+
try:
|
|
49
|
+
open("missing_file.txt") # FileNotFoundError
|
|
50
|
+
except FileNotFoundError:
|
|
51
|
+
print("Caught the error, but meme still plays!")
|
|
52
|
+
|
|
53
|
+
risky_func()
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Custom Duration for Decorator
|
|
57
|
+
```
|
|
58
|
+
# Set duration to 5 seconds
|
|
59
|
+
risky_func = meme_sound_on_error(risky_func, duration_ms=5000)
|
|
60
|
+
```
|
|
61
|
+
Manual Meme Playback
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
from meme_errors import play_meme_sound
|
|
65
|
+
|
|
66
|
+
# Play TypeError meme for default 3 seconds
|
|
67
|
+
play_meme_sound(TypeError)
|
|
68
|
+
|
|
69
|
+
# Play TypeError meme for 5 seconds
|
|
70
|
+
play_meme_sound(TypeError, duration_ms=5000)
|
|
71
|
+
```
|
|
72
|
+
Default Memes Included:
|
|
73
|
+
|
|
74
|
+
| Exception Type | Default Meme File |
|
|
75
|
+
|-----------------------|----------------------------------------|
|
|
76
|
+
| TypeError | emotional-damage-meme.mp3 |
|
|
77
|
+
| FileNotFoundError | galaxy-meme.mp3 |
|
|
78
|
+
| Exception (fallback) | meme-de-creditos-finales.mp3 |
|
|
79
|
+
|
|
80
|
+
You can replace these using `set_error_sound()`.
|
|
81
|
+
|
|
82
|
+
## Notes:
|
|
83
|
+
|
|
84
|
+
- **Audio Trimming:** Audio is trimmed to a default of 3 seconds to prevent long playback.
|
|
85
|
+
- **Compatibility:** Works on Windows, macOS, and Linux (requires `playsound` and `pydub`).
|
|
86
|
+
- **Non-blocking:** Playback is handled via `playsound`.
|
|
87
|
+
|
|
88
|
+
## License:
|
|
89
|
+
|
|
90
|
+
MIT License – see [LICENSE](LICENSE) file.
|
|
91
|
+
|
|
92
|
+
## Contributing:
|
|
93
|
+
|
|
94
|
+
Fork the repo, add your own meme sounds or improve features, and submit a Pull Request.
|
|
95
|
+
Have fun making Python errors **hilarious!** 😂
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: meme-errors
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Play funny meme sounds when Python errors occur!
|
|
5
|
+
Home-page: https://github.com/JAY-MU-4098/meme_errors
|
|
6
|
+
Author: Jay Gogra
|
|
7
|
+
Author-email: pyex1.1@gmail.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.7
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: pygame
|
|
14
|
+
Requires-Dist: pydub
|
|
15
|
+
|
|
16
|
+
# Meme Errors
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Play funny meme sounds whenever Python exceptions occur — **even if the error is handled!** Customize your sounds per exception type, set trim duration, and enjoy some chaotic developer humor.
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
* **Automatic memes** on uncaught exceptions.
|
|
24
|
+
* **Handled exceptions support** via decorator or context manager.
|
|
25
|
+
* **Custom sounds** per exception type.
|
|
26
|
+
* **Automatic trimming** of long sounds (default 3 seconds).
|
|
27
|
+
* **Optional custom duration** per error or decorator.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install meme-errors
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Use code with caution. Usage Global Uncaught Errors Automatically plays a meme when an exception occurs that is not handled:
|
|
38
|
+
```
|
|
39
|
+
import meme_errors
|
|
40
|
+
|
|
41
|
+
# This will play the default Exception meme
|
|
42
|
+
1 / 0 # Division by zero
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
Custom Memes for Specific Exceptions
|
|
47
|
+
```
|
|
48
|
+
import meme_errors
|
|
49
|
+
|
|
50
|
+
# Set a custom meme for TypeError
|
|
51
|
+
meme_errors.set_error_sound(TypeError, "/path/to/emotional-damage-meme.mp3")
|
|
52
|
+
|
|
53
|
+
# Set a custom meme for FileNotFoundError
|
|
54
|
+
meme_errors.set_error_sound(FileNotFoundError, "/path/to/galaxy-meme.mp3")
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Handled Exceptions Using a Decorator
|
|
58
|
+
```
|
|
59
|
+
from meme_errors import meme_sound_on_error
|
|
60
|
+
|
|
61
|
+
@meme_sound_on_error
|
|
62
|
+
def risky_func():
|
|
63
|
+
try:
|
|
64
|
+
open("missing_file.txt") # FileNotFoundError
|
|
65
|
+
except FileNotFoundError:
|
|
66
|
+
print("Caught the error, but meme still plays!")
|
|
67
|
+
|
|
68
|
+
risky_func()
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Custom Duration for Decorator
|
|
72
|
+
```
|
|
73
|
+
# Set duration to 5 seconds
|
|
74
|
+
risky_func = meme_sound_on_error(risky_func, duration_ms=5000)
|
|
75
|
+
```
|
|
76
|
+
Manual Meme Playback
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
from meme_errors import play_meme_sound
|
|
80
|
+
|
|
81
|
+
# Play TypeError meme for default 3 seconds
|
|
82
|
+
play_meme_sound(TypeError)
|
|
83
|
+
|
|
84
|
+
# Play TypeError meme for 5 seconds
|
|
85
|
+
play_meme_sound(TypeError, duration_ms=5000)
|
|
86
|
+
```
|
|
87
|
+
Default Memes Included:
|
|
88
|
+
|
|
89
|
+
| Exception Type | Default Meme File |
|
|
90
|
+
|-----------------------|----------------------------------------|
|
|
91
|
+
| TypeError | emotional-damage-meme.mp3 |
|
|
92
|
+
| FileNotFoundError | galaxy-meme.mp3 |
|
|
93
|
+
| Exception (fallback) | meme-de-creditos-finales.mp3 |
|
|
94
|
+
|
|
95
|
+
You can replace these using `set_error_sound()`.
|
|
96
|
+
|
|
97
|
+
## Notes:
|
|
98
|
+
|
|
99
|
+
- **Audio Trimming:** Audio is trimmed to a default of 3 seconds to prevent long playback.
|
|
100
|
+
- **Compatibility:** Works on Windows, macOS, and Linux (requires `playsound` and `pydub`).
|
|
101
|
+
- **Non-blocking:** Playback is handled via `playsound`.
|
|
102
|
+
|
|
103
|
+
## License:
|
|
104
|
+
|
|
105
|
+
MIT License – see [LICENSE](LICENSE) file.
|
|
106
|
+
|
|
107
|
+
## Contributing:
|
|
108
|
+
|
|
109
|
+
Fork the repo, add your own meme sounds or improve features, and submit a Pull Request.
|
|
110
|
+
Have fun making Python errors **hilarious!** 😂
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
name = meme-errors
|
|
3
|
+
version = 0.1.0
|
|
4
|
+
author = Jay Gogra
|
|
5
|
+
author_email = pyex1.1@gmail.com
|
|
6
|
+
description = Play funny meme sounds when Python errors occur!
|
|
7
|
+
long_description = file: README.md
|
|
8
|
+
long_description_content_type = text/markdown
|
|
9
|
+
url = https://github.com/JAY-MU-4098/meme_errors
|
|
10
|
+
classifiers =
|
|
11
|
+
Programming Language :: Python :: 3
|
|
12
|
+
License :: OSI Approved :: MIT License
|
|
13
|
+
Operating System :: OS Independent
|
|
14
|
+
|
|
15
|
+
[options]
|
|
16
|
+
packages = find:
|
|
17
|
+
include_package_data = True
|
|
18
|
+
python_requires = >=3.7
|
|
19
|
+
install_requires =
|
|
20
|
+
pygame
|
|
21
|
+
pydub
|
|
22
|
+
|
|
23
|
+
[options.packages.find]
|
|
24
|
+
where = .
|
|
25
|
+
|
|
26
|
+
[egg_info]
|
|
27
|
+
tag_build =
|
|
28
|
+
tag_date = 0
|
|
29
|
+
|