Skip to main content

Python in Kannada

Project description

pyKannada

Python Version License

📝 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

  1. Clone the repository:

    git clone https://github.com/mithun50/pyKannada.git
    cd pyKannada
    pip install .
    
  2. Ensure you have Python 3.6 or higher installed.

  3. 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
ಮುದ್ರಿಸು print
ವಿಧ 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

  1. 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.
  2. Visual Studio Code:

      1. 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 or Noto Serif Kannada.
      1. 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.
      1. Update VS Code:
      • Always use the latest version of Visual Studio Code, as updates may improve support for international languages.
      1. 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.
      1. Testing in Different Terminals:
      • Try running your scripts in various terminals to see if they display Kannada characters correctly.
      1. 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.

  1. 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:

Visit our project repository: pyKannada GitHub

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pykannada-1.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

pyKannada-1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file pykannada-1.0.tar.gz.

File metadata

  • Download URL: pykannada-1.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pykannada-1.0.tar.gz
Algorithm Hash digest
SHA256 90242ea04a8f71fd3fc7cc19b43421dda766c53fe1195fbc5719c6ebb35a2606
MD5 9140f9094d070927453c3c706e194662
BLAKE2b-256 b59f170568c9d338a9dd562d18f01d235de8da62b306122b31262c2dad332797

See more details on using hashes here.

File details

Details for the file pyKannada-1.0-py3-none-any.whl.

File metadata

  • Download URL: pyKannada-1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pyKannada-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aaeb388fb905e2b5f8ccfbcb5a3578d5045c409a5af7b2d574ee5fcfa7fca1d3
MD5 6523fa91cbc6672356447b0c4b0fc636
BLAKE2b-256 0842944c90add2f0fce4779e800147210bc9412780a7b5f0bf46c525e8929675

See more details on using hashes here.

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