Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bill-c-martin/python-for-php-devs
Broad overview of Python from a PHP developer's perspective with code examples to tinker with.
https://github.com/bill-c-martin/python-for-php-devs
comparison php python
Last synced: 2 months ago
JSON representation
Broad overview of Python from a PHP developer's perspective with code examples to tinker with.
- Host: GitHub
- URL: https://github.com/bill-c-martin/python-for-php-devs
- Owner: bill-c-martin
- Created: 2022-02-18T04:16:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-07T07:55:37.000Z (almost 2 years ago)
- Last Synced: 2024-04-21T03:12:29.117Z (8 months ago)
- Topics: comparison, php, python
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python: for PHP Developers
Supplementary repo for my "Python for PHP Developers: Deep Dive" series of articles, which explore Python in depth, but from a PHP developer's perspective:
- [Python for PHP Developers: Deep Dive Part 1](https://billmartin.io/blog/python-for-php-developers-part-1)
- [Python for PHP Developers: Deep Dive Part 2](https://billmartin.io/blog/python-for-php-developers-part-2)
- Python for PHP Developers: Deep Dive Part 3 (pending)
- Python for PHP Developers: Deep Dive Part 4 (pending)This repo may prove useful for tinkering with the same Python code examples used in these articles.
## Install Python and Friends
In Ubuntu:
```bash
sudo apt update
sudo apt -y upgrade# Confirm python 3.* is installed, else install it
python3 -V# Get le friends too
sudo apt install -y python3-pip
sudo apt install -y build-essential libssl-dev libffi-dev python3-dev
```### Setup Virtual Environment
Install `venv`:
```bash
sudo apt install -y python3-venv
```Clone this repo, and in the root directory, setup a virtual environment:
```bash
python3 -m venv env
```Activate the virtual environment:
```bash
source env/bin/activate
```Test run one of the `.py` files in this repo:
```bash
python3 code/01-hello.py
```To exit the virtual environment:
```bash
deactivate
```