Alien Language Translator is a fun and creative Python package that translates Python code into an alien-like syntax. Whether you're learning Python, teaching programming, or just looking for a fun way to experiment with code, this package is for you!
- Translate Python to Alien Language: Convert Python code into a unique alien-like syntax.
- Translate Alien Language to Python: Convert alien code back into Python.
- Command-Line Interface (CLI): Easily translate files or code snippets via the command line.
- Interactive Mode: Translate Python code in real-time using an interactive shell.
- Lightweight and Easy to Use: No dependencies, just pure Python fun!
You can install the alien_language
package via pip:
pip install alien-language
To translate a Python file (my_script.py
) into alien language and save the output to alien_script.alien
:
alien-translate --to-alien --input my_script.py --output alien_script.alien
To translate an alien language file (alien_script.alien
) back into Python and save the output to my_script.py
:
alien-translate --to-python --input alien_script.alien --output my_script.py
Start the interactive mode to translate Python code into alien language in real-time:
alien-translate --interactive
Example:
>>> print("Hello, Alien!")
zorp("Hello, Alien!")
Type exit
to quit the interactive mode.
def greet(name):
if name == "Alien":
print("Hello, Alien!")
else:
print("Hello, Human!")
plorp greet(name) [
glorp name ==== "Alien" <
zorp("Hello, Alien!")
florp <
zorp("Hello, Human!")
>
]
We welcome contributions! If you'd like to contribute to the project, please follow these steps:
- Fork the repository on GitHub.
- Create a new branch for your feature or bugfix.
- Commit your changes and push them to your fork.
- Submit a pull request with a detailed description of your changes.
For bug reports or feature requests, please open an issue on the GitHub Issues page.
This project is licensed under the MIT License. See the LICENSE file for details.
If you find this project useful, please consider giving it a ⭐️ on GitHub. Your support helps us improve and maintain the project!
For questions or feedback, feel free to reach out:
- Author: Ishan Oshada
- Email: ishan.kodithuwakku.offical@gmail.com
- GitHub: ishanoshada
- Project URL: https://github.com/ishanoshada/alien-language