|
1 | 1 | # PyCalc |
2 | 2 |
|
3 | | -PyCalc is a sample calculator implemented using Python 3 and with a [PyQt5](https://www.riverbankcomputing.com/static/Docs/PyQt5/introduction.html) GUI. PyCalc implements the most basic math operations, that is, division, multiplication, addition, and subtraction. |
| 3 | +PyCalc is a sample calculator implemented using Python 3 and with a [PyQt6](https://www.riverbankcomputing.com/static/Docs/PyQt6/introduction.html) GUI. PyCalc implements basic math operations, including division, multiplication, addition, and subtraction. |
4 | 4 |
|
5 | | -PyCalc is intended to be a demonstrative example on how you can implement a Python + PyQt5 GUI application using the Model-View-Controller (MVC) pattern. |
| 5 | +PyCalc is intended to be a demonstrative example of how to build a Python + PyQt6 GUI application using the Model-View-Controller (MVC) pattern. |
6 | 6 |
|
7 | 7 | ## Screenshot |
8 | 8 |
|
9 | 9 |  |
10 | 10 |
|
11 | 11 | ## Requirements |
12 | 12 |
|
13 | | -For PyCalc to work, you need to have a proper installation of [Python](https://www.python.org) >= 3.6. Then you need to install the PyQt5 library in your system. This can be done by using `pip3` as follows: |
| 13 | +For PyCalc to work, you need to have [Python](https://www.python.org) >= 3.6.1. Then you need to install the PyQt6 library. You can do this by using `pip` in a Python virtual environment: |
14 | 14 |
|
15 | 15 | ```console |
16 | | -$ sudo pip3 install pyqt5 |
| 16 | +$ python -m venv venv |
| 17 | +$ source venv/bin/activate |
| 18 | +$ python -m pip install pyqt6 |
17 | 19 | ``` |
18 | 20 |
|
19 | | -We don't recommend you to install PyCalc's requirements directly into your system, as PyCalc is just a sample application. So, you can use a virtual environment to test PyCalc out. To do that, you can run the following commands: |
20 | | - |
21 | | -```console |
22 | | -$ python3 -m venv pycalc |
23 | | -$ source pycalc/bin/activate |
24 | | -$ pip install pyqt5 |
25 | | -``` |
26 | | - |
27 | | -After this steps are finished, you can run and test PyCalc as described in the next section. |
28 | | - |
29 | | -**Note**: For more information on how to install PyQt5, you can take a look at the related topic on the [project's documentation](https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html). |
| 21 | +After these commands have finished, you can run PyCalc as described in the next section. |
30 | 22 |
|
31 | 23 | ## How to Run PyCalc |
32 | 24 |
|
33 | | -To run PyCalc from your system's command-line and try it out, you can execute the following command: |
| 25 | +To run PyCalc from your system's command line or terminal, execute the following command: |
34 | 26 |
|
35 | 27 | ```console |
36 | | -$ python3 pycalc.py |
| 28 | +$ python pycalc.py |
37 | 29 | ``` |
38 | 30 |
|
39 | | -After running this command, you'll see PyCalc running on your screen. |
| 31 | +After running this command, you'll get PyCalc running on your machine. |
40 | 32 |
|
41 | 33 | ## How to Use PyCalc |
42 | 34 |
|
43 | | -To use PyCalc, you just need to enter a valid math expression using your mouse and then press `Enter` or click on the `=` sign: |
| 35 | +To use PyCalc, just enter a valid math expression using your mouse and then press `Enter` or click the `=` button to get the result: |
44 | 36 |
|
45 | 37 |  |
46 | 38 |
|
47 | 39 | ## About the Author |
48 | 40 |
|
49 | | -My name is Leodanis Pozo Ramos. I'm a **freelance Python Developer, and [author](https://realpython.com/team/lpozoramos/)**. If you need more information about me, and my work, then you can take a look at my [personal page](https://lpozo.github.com/). |
50 | | - |
51 | | -## License |
52 | | - |
53 | | -PyCalc is released under the [MIT License](https://opensource.org/licenses/MIT). |
| 41 | +Leodanis Pozo Ramos is a **self-taught Python Developer, and [content creator](https://realpython.com/team/lpozoramos/)** at Real Python. |
0 commit comments