No project description provided
Project description
A simple Calculator Project
In this project, i used a Fire to solve expressions such as BODMAS,which solves multiple operations i.e addition,subtraction,multiplication and division. Where fire is a Python library that will turn any Python component into a command line interface with just a single call to Fire. The easiest way to use Fire is to take any Python program, and then simply call fire.Fire() at the end of the program. This will expose the full contents of the program to the command line.
Getting Started
How to run project?
- Create a virtual environment on your local machine
python3 -m venv env
- Activate virtual environment
source env/bin/activate
-
Make a local directory
-
Clone project in your directory
git clone https://github.com/mugdhadalal/pycalci.git
- Install setup.py
python3 setup.py install
- Use command pycalci,it will show you commands
$ pycalci
NAME
pycalci
SYNOPSIS
pycalci COMMAND
COMMANDS
COMMAND is one of the following:
solve
- use pycalci solve EXPRESSION
$ pycalci solve 2+4*5/2
12.0
Example
import fire
def hello(name):
return 'Hello {name}!'.format(name=name)
if __name__ == '__main__':
fire.Fire()
Here's how we can run our program from the command line:
$ python example.py hello World
Hello World!
Dependancies
Scripting Language = Python 3.0+
Command-Line Option = fire
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.
Source Distribution
Built Distribution
File details
Details for the file pycalci-0.1.1.tar.gz
.
File metadata
- Download URL: pycalci-0.1.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c431dc056554861ecd02d1a38ed18e8bbf5024c187e08374d8bbf89c31bcdac |
|
MD5 | 05fb552758eea16f8d26b5f9ca98fd28 |
|
BLAKE2b-256 | 923d0173fabcfebf78b7fe191c3ce2bad19443f278bcbb860eda5923b56c4703 |
File details
Details for the file pycalci-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pycalci-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8968576cef9cec5a0d6beaf8af93333b2eae7de2d8de1701ab13d8de6887b5c6 |
|
MD5 | 5efba33f983ae4b5b5bf498c1ba79708 |
|
BLAKE2b-256 | 528ae353025254112123d5ba44ac4738294f9e50b2afcb46155ed1f3f3a510f5 |