Saturday, August 31, 2013

Execute Python Script in Windows

Simple Note

Simply type then press Enter in cmd.


h = "hello"
w = "world"
print(h + " " + w + "!")




Execute System Command in Python

Simple Note

(Assume the command that can clear screen called cls and you want to clear screen in Python Interactive Mode)

import os lib then call os.system(COMMAND) as below:



Python Getting Started

Simple Note


1. Go to download page ( for now) and download what you need (I choose Python 3.3.2 Windows x86 MSI Installer).

2. Execute downloaded file to install Python (Assume you installed it at C:\Python33).

3. Open command line and
    * Option A: go to the installed location (Assume C:\Python33)
    * Option B: type set path=%path%;C:\Python33 (for Windows) to make it accessible anywhere

4. Type "python", press Enter, type "help()", press Enter.

5. Go to tutorial page displayed in help message.

6. Go through tutorial to learn it.