A calculator made in python.
This application uses the Reverse Polish Notation for calculations.
The algorithm is written in C++, but the user interface is made in PySimpleGui.
- If anyone wants to contribute feel free to do so. Just send a pull request and I will review it.
- You can check out the issues or the to-do list at the bottom of this readme.
- Install python
- Install PySimpleGUI
pip install PySimpleGUI
- Install playsound
pip install playsound
- Make sure that the .pyd file and the .py file are in the same folder
- Just do this line in the same directory as the files.
python CalculatorUI.py
- It should work.
- Make sure you have cmake and pybind11 installed.
- Go to the c++ folder. In the project directory do:
cd src/c++
- Sometimes CMake can have problems with finding pybind11. To fix this try this:
- In console
pip show pybind11
. - In CMakeLists.txt change [LOCATION] to the location you get from the command.
- If your path contains single escape characters
\
make sure to replace them with\\
cmake .
cmake --build .
- The .pyd file should be located in one of the folders created.
- Now you can move the .pyd file to the python src folder and build the rest.
- In console
- This process is quite complicated and I myself had a lot of problems with using pybind.
- I'm going to leave this guide. It does a much better job explaining this than I could.
- Write the rpn algorithm in C++ [x]
- Write tests to make sure things are running smoothly [x]
- Organize rpn code to be more readable [x]
- Bind the C++ code to python [x]
- Create a GUI [x]
- Add functionality to the GUI [x]
- Fix all the bugs [ ]
- Add documentation [ ]
- Light and dark mode [ ]
- Window confirming if the user wants to exit the calculator [x]