Wednesday, June 3, 2020

0 - Python in 10(minutes)


This is just a very quick guide to setup and use a python code development environment.

download PyCharm here
https://www.jetbrains.com/pycharm/

Launch Pycharm and start a new project with a relevant name.  At this point PyCharm will get ready for a new project and download and install python.

You may be prompted to exclude project directories from Windows Defender scanning.

Right click the project with the name you selected and select New_Python File.

A Python code window will open.

This installs a tool which can compile python code into an exe file.

Open a command window and change directory to %USERPROFILE%\pycharmprojects\<projectname>\venv\scripts

run the command

pip install pyinstaller


To begin code development enter the code into the python file window.  Editing is automatically saved to the .py file.

To run or test the code, open a command window and change directory to the scripts folder as above.

python <path to .py file>


Once the code is operating successfully, compile it with

pyinstaller <path to .py file>

The compiled exe file is generated in %USERPROFILE%\pycharmprojects\<projectname>\venv\scripts\dist