Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 2.26 KB

README.md

File metadata and controls

62 lines (40 loc) · 2.26 KB

macOS Calculator in Python

This is a simple calculator application designed to mimic the look and functionality of the macOS Calculator. It is built using Python's Tkinter library and provides basic arithmetic operations along with a user-friendly interface. With the help of WhiteSur GTK theme for the Traffic light buttons.

Features

  • Basic arithmetic operations: addition, subtraction, multiplication, and division.
  • Toggle the sign of the last entered number.
  • Clear the entry field with a single button press.
  • Input validation to handle errors gracefully.
  • Adjustable button layout and styles to resemble the macOS calculator.

Requirements

To run this application, you need:

  • Python 3.x installed on your machine.
  • Tkinter (usually included with Python standard libraries).

Installation

  1. Download the file in Releases

  2. Extract it

  3. Open a Terminal window in the folder

  4. Use this command:

    python3 cal.py
  5. Voilà!

Tested on ZorinOS 17 core

Usage

  • I suggest using vinceliuice's WhiteSur GTK theme to get the traffic light buttons like macOS.
  • Launch the application, and you will see the calculator interface.
  • Use the buttons to perform calculations.
  • You can use the C button to clear the input.
  • The ± button toggles the sign of the last entered number.
  • The application limits the input length to ensure visibility.

Customization

Feel free to customize the appearance and functionality of the calculator. You can modify the button colors, fonts, and other settings in the cal.py file.

Screenshots

Screenshot from 2024-10-30 09-20-40

Contributing

If you wish to contribute to this project, feel free to create a pull request or open an issue for any bugs or feature requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspired by the macOS Calculator app design.
  • Special thanks to the Python community for the support and libraries that made this possible.