Skip to main content

Simple tool for calculate the numerical result from a expression string by python

Project description

Python Opcalc 0.0.1

Simple tool for calculate the numerical result from a expression string by python

Based on stack and queue

Install

Just use pip to install ! :D

pip install opcalc

License

MIT License

Examples

Simple calculator program:

import opcalc.core as opc
calculator = opcalc.OperationCalculator()
calculator.input_str = "#*60"
print(calculator.CalcExpression())
print("SymCalc demo")
print("Copyright (c) Quix Fan  @ZQWEI  All right reserved.")
calculator.input_str = "#*60"
print(calculator.CalcExpression())
while True:
    try:
        result = calculator.CalcExpression()
        print(result)
    except:
        print("Invalid Input!")
    calculator.input_str = "#*60"
    print(calculator.CalcExpression())

Project details


Download files

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

Source Distribution

opcalc-0.0.1a0.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

opcalc-0.0.1a0-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

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