Saturday, 11 June 2016

Simple Tamil Calculator Program using Python

Hi guys, In this post I will share you a simple Tamil calculator program using Python.

In this program, I used simple logic to import Tamil fonts in my Python code. You can also import your own regional language in your Python code by just adding the following line on top of your code.

# -*- coding: utf-8 -*-

UFT 8 is the one type of encoding method. It is used to encode text in any language. You can find about more in this wiki link.

Note: For Linux users -> You can follow my previous article. Where i showed how to write Tamil in Fedora based systems.
         For Windows users -> You can use NHM writer to write in Tamil on your computer.
         For Mac/other users -> Use online Tamil Keyboard.

Warning: (For Linux users)
      There is a bug in gnome-terminal. It does not render Tamil fonts properly. Recently I had reported the bug in Redhat Bugzilla. So now, better use Konsole terminal emulator.



Installing Konsole on Linux machines:
#yum install -y konsole       (For Red Hat, CentOS, Scientific Linux based machines)
#dnf install -y konsole        (For Fedora based systems)
#apt-get install konsole      (For Ubuntu based systems)
After installing konsole, launch the konsole application. It supports Tamil fonts pretty.

TamilCalPy
   I have created simple Tamil calculator using Python. To get this code in your machine
#git clone https://github.com/sbuvaneshkumar/TamilCalPy.git

To run it
#cd TamilCalPy/
#python3.4 TamilCalPy.py


 Note: This code requires Python 3.x version.

If you are facing any problems while importing your regional fonts in your code, feel free to contact linuxsbk@gmail.com.

No comments:

Post a Comment