A morse decrypter and encrypter module for python
Project description
Morsepy
A morse encrypter/decrypter module for python
How to use
pip install morsepy
To encrypt to morse:
from morsepy import Morsepy
# prints out string as morsecode
print(Morsepy.encrypt('hello world')
This would return .... . .-.. .-.. --- / .-- --- .-. .-.. -..
To decrypt from morse
from morsepy import Morsepy
# prints out morse code as string
print(Morsepy.decrypt('.... . .-.. .-.. --- / .-- --- .-. .-.. -..')
This would return hello world
Formatting Rules
To make using this module easier it's important to format your morse well:
- Have one white space between each character
- Have a slash between each word, you can pad this with white space or not but it's important you choose one and only use that (e.g '- .... .. ... / .-- --- -. .----. -/.-- --- .-. -.-' won't work)
Making morse beeps
Morsepy can output a morse signal as a series of beeps with the beep()
funnction
from morsepy import Morsepy
Morsepy.beep('hello world!') #outputs a series of beeps for the morse code of 'hello world!'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
morsepy-0.3.2.tar.gz
(4.1 kB
view details)
File details
Details for the file morsepy-0.3.2.tar.gz
.
File metadata
- Download URL: morsepy-0.3.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9de402b631f6c4945bcac0d4b6ae08cd5d370238556e78fb9f3e8db7008a2ff8 |
|
MD5 | bdb45a35b0f71139ceecf33a5fb0c9c2 |
|
BLAKE2b-256 | 4261ee2589faba608323c1ff20c211b83b6192b70bb7db736de0541a750d781f |