Skip to main content

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


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 hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page