Richard Wen (rrwen.dev@gmail.com)
A quick introduction to Python in Windows, which includes setting up Python/Wing IDE 101, and some basic examples.
- Python is a general-purpose programming language that focuses on code readability and rapid development
- Wing IDE 101 provides a Graphical User Interface (GUI) complete with an editor, console, and debugger to make writing Python code easier
Requirements
Explore the examples by switching branches in this repository.
- Download and install Python 2.7 and Wing IDE (see the install guide in section 2.0)
- Download and unzip this repository
- Run cmd.bat
- Execute a simple Python file via the command line:
python sample\helloworld.py
- Try the basic examples with Wing IDE 101 and refer to the python docs
Package Installation
pip is Python's package management system for packages found in the package index. Run pip through the command line with your path variable set correctly set PATH=%PATH%;C:\Python27\;C:\Python27\Scripts\
.
- To get a list of available commands:
pip help
- To get a list of installed packages:
pip list
- To install a package:
pip install package
- To uninstall a package:
pip uninstall package
- To upgrade a package:
pip install package --upgrade
- To upgrade pip on windows:
python -m pip install --upgrade pip
Python 2.7
- Download and install Python 2.7 with default settings
- In a command prompt, type in
set PATH=%PATH%;C:\Python27\;C:\Python27\Scripts\
- Then, type in
python
and you should be in the Python shell
Wing IDE 101
- Download and install Wing IDE 101 with default settings
- Open Wing IDE 101 and go to: Tools -> Python Shell and check that Python runs correctly; if not proceed to steps 3 and 4