Python in Kannada
Project description
pyKannada
📝 Introduction
pyKannada is an innovative Python interpreter that allows users to write and execute Python code using Kannada keywords. This project aims to make programming more accessible to Kannada speakers, empowering a new generation of developers.
🚀 Features
- Kannada Keywords: Use Kannada keywords for common Python functions, control flow statements, and more.
- Interactive REPL: Enter a Read-Eval-Print Loop to execute Kannada code interactively.
- File Execution: Execute Kannada script files directly.
- Keyword Mapping: Easily edit the keyword mappings to customize the interpreter to your needs.
- Cross-Platform Compatibility: Works on Windows, macOS, and Linux.
💻 Installation
-
Clone the repository:
git clone https://github.com/mithun50/pyKannada.git cd pyKannada pip install .
-
Ensure you have Python 3.6 or higher installed.
-
You can run the interpreter directly using:
python -m pyKannada
OR
📦 PyPI
pyKannada is available on PyPI, allowing for easy installation via pip. You can install it using:
pip install pyKannada
📚 Usage
(In Case of Windows and Other)
Running in REPL Mode
To enter interactive mode:
python -m pyKannada
Executing a Script File
To execute a Kannada script file:
python -m pyKannada path/to/your/script.py
Editing Keywords
To edit the keyword mappings:
python -m pyKannada --edit-keywords
OR You Can USE (In Case of Linux or Other)
Running in REPL Mode
To enter interactive mode:
pyKannada
Executing a Script File
To execute a Kannada script file:
pyKannada path/to/your/script.py
Editing Keywords
To edit the keyword mappings:
pyKannada --edit-keywords
🗺️ Keyword Mapping
Here’s a mapping of Kannada keywords to their Python equivalents, You can Change it :
Kannada Keyword | Python Equivalent |
---|---|
ಮುದ್ರಿಸು | |
ವಿಧ | type |
ಒಳಸೇರಿಸು | input |
ಉದ್ದ | len |
ಸಾಲು | str |
ಪೂರ್ಣಸಂಖ್ಯೆ | int |
ಸಮ್ಮತ | float |
ಪಟ್ಟಿ | list |
ನೆರಕೆ | dict |
ರಾಶಿ | set |
ಟ್ಯೂಪಲ್ಸ್ | tuple |
ಬೂಲ್ | bool |
ಒಂದು_ವೇಳೆ | if |
ಇಲ್ಲದಿದ್ದರೆ | elif |
ಬೇರೆ | else |
ಬದಲು | for |
ವೇಳೆ | while |
ಮುರಿ | break |
ಮುಂದುವರೆಸು | continue |
ಹಿಂದಿರುಗು | return |
ಪ್ರಯತ್ನಿಸು | try |
ಹೊರತುಪಡಿಸಿ | except |
ಕೊನೆಯದಾಗಿ | finally |
ಜೊತೆಗೆ | with |
ಕಾರ್ಯ | def |
ನಿಜ | True |
ಸುಳ್ಳು | False |
ತೇರ್ಗಡೆ | pass |
ವರ್ಗ | class |
ರಲ್ಲಿ | in |
ಲ್ಯಾಂಬ್ಡಾ | lambda |
ಹಳಿಸು | del |
ಸಮಗ್ರ | global |
Example Code
Here's a simple examples using Above Kannada_keywords:
calculator.py
ಎ = ಪೂರ್ಣಸಂಖ್ಯೆ(ಒಳಸೇರಿಸು('ಮೊದಲ ಸಂಖ್ಯೆ ನಮೂದಿಸಿ: '))
ಬ = ಪೂರ್ಣಸಂಖ್ಯೆ(ಒಳಸೇರಿಸು('ಎರಡನೇ ಸಂಖ್ಯೆ ನಮೂದಿಸಿ: '))
ಚಲನ = ಒಳಸೇರಿಸು('ಚಲನ ( +, -, *, /, **) ನಮೂದಿಸಿ: ')
ಕಾರ್ಯ ಎಣಿಕೆ(ಎ, ಬ, ಚಲನ):
ಒಂದು_ವೇಳೆ ಚಲನ == '+':
ಮುದ್ರಿಸು(ಎ + ಬ)
ಇಲ್ಲದಿದ್ದರೆ ಚಲನ == '-':
ಮುದ್ರಿಸು(ಎ - ಬ)
ಇಲ್ಲದಿದ್ದರೆ ಚಲನ == '*':
ಮುದ್ರಿಸು(ಎ * ಬ)
ಇಲ್ಲದಿದ್ದರೆ ಚಲನ == '/':
ಮುದ್ರಿಸು(ಎ / ಬ)
ಇಲ್ಲದಿದ್ದರೆ ಚಲನ == '**':
ಮುದ್ರಿಸು(ಎ ** ಬ)
ಬೇರೆ:
ಮುದ್ರಿಸು('ತಪ್ಪು ಚಲನ')
ಎಣಿಕೆ(ಎ, ಬ, ಚಲನ)
🧪 Testing Experience
As part of the development process for pyKannada, extensive testing was conducted to ensure reliability and compatibility across various platforms. Here are some insights from my testing experience:
Platforms Tested
-
Pydroid 3:
- Overview: Pydroid 3 is a popular Python IDE for Android, making it accessible for users on mobile devices.
- Experience: The app performed exceptionally well, allowing users to write and execute Kannada scripts seamlessly. The user interface is intuitive, and the integration of Kannada keywords worked without any issues.
-
Visual Studio Code:
-
- Font Settings:
- Use a font that supports Kannada characters. In your VS Code settings, search for Terminal > Integrated: Font Family and set it to a font like
Noto Sans Kannada
orNoto Serif Kannada
.
-
- Change Terminal Encoding:
- Ensure your terminal is set to use UTF-8 encoding, which supports Kannada characters. This setting can typically be found in the terminal preferences.
-
- Update VS Code:
- Always use the latest version of Visual Studio Code, as updates may improve support for international languages.
-
- Use an External Terminal:
- If the integrated terminal is not displaying Kannada correctly, consider configuring VS Code to use an external terminal (such as Command Prompt or Windows Terminal) for better compatibility.
-
- Testing in Different Terminals:
- Try running your scripts in various terminals to see if they display Kannada characters correctly.
-
- Check Language Pack:
- If you are using the Kannada language pack in VS Code, ensure it is correctly installed and configured.
-
Following these steps can significantly improve your experience when working with Kannada text in Visual Studio Code.
- Standard Python Installation:
- Overview: Testing was conducted on various operating systems, including Windows, macOS, and Linux, with a standard Python installation.
- Experience: The interpreter ran smoothly on all tested platforms, demonstrating its versatility and robustness. The REPL mode and script execution performed as expected, providing consistent results.
Key Takeaways
- User-Friendly: The ability to use Kannada keywords significantly lowers the entry barrier for new programmers.
- Reliability: Extensive testing confirmed that the interpreter can handle a variety of scripts without crashing or throwing unexpected errors.
- Community Feedback: Feedback from early users highlighted the usefulness of the interactive REPL and the ease of modifying keyword mappings.
These testing experiences have solidified my belief in the potential of pyKannada to make programming more accessible to Kannada speakers and foster a new generation of developers.
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
📞 Contact
For more information, questions, or suggestions, please reach out to the authors:
-
MithunGowda.B
Email: mithungowda.b7411@gmail.com
Instagram: @mithungowda -
Manvanth
Email: appuka1431@gmail.com
Instagram: @manvanth
Visit our project repository: pyKannada GitHub
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.