Wednesday, July 27, 2011

[Level 2] How to get python version on run-time.

#!/bin/env python
import sys
print sys.version
# python -c 'import sys; print sys.version'
2.6.5 (r265:79063, Apr 16 2010, 13:57:41) 
[GCC 4.4.3]

Wish this helps. regards, Stanley Huang