This article focuses on installing the Python application component in EasyPHP. This article also assumes you have an IDE installed and have completed the following articles:
- Setup EasyPHP DevServer on My Local Windows PC
- Setup the EasyPHP Dashboard
- CSV to MySQL Table [EasyPHP + PHPMyAdmin]
and the following steps:
- Started EasyPHP
- Opened the Dashboard
- Started the HTTP and Database servers
Download the Software
To download the Python application component, navigate to the web page for Python 2.7.11 for Devserver 17.0. The installation process should begin immediately. Once complete, move the executable file to the Desktop (or another selected location).
Start the Installation Process
Double-click the installation icon on the Desktop (or a different selected location) to start the installation process.
Allow App to Make Changes Dialog Box
The first dialog box you will see prompts you to allow this app to make changes to your device. Click the Yes button to confirm and move forward.
Select Setup Language Dialog Box
From the Select Setup Language dialog box, click the dropdown box and select the appropriate language. Then, click the OK button to confirm the selection and move forward.
Select Destination Location Dialog Box
From the Select Destination Location dialog box, you can either click the Browse button to select a new location or ignore and leave the default location as-is. Then, click the Next button to confirm the selection and move forward.
💡Note: The default location, for this example, was left as-is.
Ready to Install Dialog Box
From the Ready to Install dialog box, click the Install button and wait for the process to complete the installation.
Installation Completion Dialog Box
Click the Finish button to complete the installation.
If successful, a ready-to-use Python application component is now available in the current EasyPHP Devserver.
You may need to restart the servers and restart EasyPHP to see the changes.
Configure Python in EasyPHP
Now we need to configure the Python application component. To do this, navigate to the EasyPHP Dashboard, and click the applications link on the top menubar.
This action forwards you to the EASYPHP DEVSERVER page.
Then, on the left-hand menu, click to select PYTHON. This action forwards you to the PYTHON page.
Select a Python Version
At this point, only one (1) version is currently available. Click the select button to confirm.
💡Note: You could click the
+ button to add a different version. For this article, we will leave it as-is.
The toggle button now changes to active, and the version displays in a dark text color as shown below.
The Shebang Line
Shebang Line shown below must be added to the top of each python script. This line lets EasyPHP know what interpreter to use while processing the file. In this case
#!C:\Program Files (x86)\EasyPHP-Devserver-17\eds-binaries\python\default\python.exe
Sample Python File
After the installation process, EasyPHP added a sample Python file:
python_example.py and placed it in the following folder:
C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www
💡Note: This location will vary if you installed EasyPHP somewhere else.
View Python Script in a Browser
python_example.php in a web browser tab, navigate to the home page of the EasyPHP Dashboard.
Click the Portable Directory icon to expand the contents.
This action displays the following (your contents may differ):
python_example.py to be forward to a new browser tab and display the HTML code!
View HTML Source Code
Let’s view the HTML source code from the HTML web page above and the
Right-mouse-click over any white area on the above HTML web page to display a pop-up. Then, click the View page source item, or CTRL+U.
This action opens a new browser tab and displays the HTML source code for the selected page.
Compare the Python file with the source code to figure out what is happening here.
🌟The Finxter Challenge
Modify the HTML code in
Reload/refresh the web page to view the changes. Good Luck!
This concludes our series on Installing and Configuring EasyPHP!
Question: How did the programmer die in the shower? ☠️
❗ Answer: They read the shampoo bottle instructions:
Lather. Rinse. Repeat.
At university, I found my love of writing and coding. Both of which I was able to use in my career.
During the past 15 years, I have held a number of positions such as:
In-house Corporate Technical Writer for various software programs such as Navision and Microsoft CRM
Corporate Trainer (staff of 30+)
Implementation Specialist for Navision and Microsoft CRM
Senior PHP Coder