Skip to content

rrwen/py-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Introduction

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.

1.0 Quick Start

  1. Download and install Python 2.7 and Wing IDE (see the install guide in section 2.0)
  2. Download and unzip this repository
  3. Run cmd.bat
  4. Execute a simple Python file via the command line: python sample\helloworld.py
  5. 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

2.0 Install Guide

Python 2.7

  1. Download and install Python 2.7 with default settings
  2. In a command prompt, type in set PATH=%PATH%;C:\Python27\;C:\Python27\Scripts\
  3. Then, type in python and you should be in the Python shell

Wing IDE 101

  1. Download and install Wing IDE 101 with default settings
  2. Open Wing IDE 101 and go to: Tools -> Python Shell and check that Python runs correctly; if not proceed to steps 3 and 4

3. Go to: _Edit -> Configure Python..._

4. Select custom, browse to the directory of your installed Python, and select _python.exe_