Python: py2exe setup file example

py2exe is a Python package that can convert Python scripts into executable Windows programs. This is an example of py2exe setup file.

Continue reading

Posted in Python | Tagged , | 1 Comment

Check your blog load time

This tool could be used to determine a blog load time.

Continue reading

Posted in Blog Tips, WordPress | Tagged , | Leave a comment

Python: Initialize list and tuple values

This tutorial will show on how to give a Python list an initial value.

To initialize a ten items list with values set to 0:

Continue reading

Posted in Python | Tagged , , , | 2 Comments

Python: Make division always produce real numbers

A division of 7/3 in Python will gives a result of 2. However, this is not correct. Since Python always assume that the numbers are whole numbers, the result will be truncated from 2.5 to 2.

A work around is to write one or both of the numbers as a decimal:

Continue reading

Posted in Python | Tagged , , , | Leave a comment

Python: Put comma(s) to numbers

This script will put commas between each group of three digits number. For example, 1234567 will become 1,234,567.

Continue reading

Posted in Python | Tagged , , | Leave a comment