¡@

Home 

python Programming Glossary: sys.version_info

How do I check what version of Python is running my script?

http://stackoverflow.com/questions/1093322/how-do-i-check-what-version-of-python-is-running-my-script

Python 2 and Python 3 dual development

http://stackoverflow.com/questions/11372190/python-2-and-python-3-dual-development

your Python 3 specific code is very rare you can check for sys.version_info 3 and basically do what six does but in an ad hoc fashion. Automatic..

Connection error to Access database

http://stackoverflow.com/questions/12800101/connection-error-to-access-database

import firebirdsql import os sys import json sqlite3 sql sys.version_info s1 ''' create table CLIENTS ID INTEGER NOT NULL COMPANY VARCHAR..

Popen waiting for child process even when the immediate child has terminated

http://stackoverflow.com/questions/13243807/popen-waiting-for-child-process-even-when-the-immediate-child-has-terminated

DETACHED_PROCESS CREATE_NEW_PROCESS_GROUP elif sys.version_info 3 2 # assume posix kwargs.update preexec_fn os.setsid else #..

Using Python 3.1 with TextMate

http://stackoverflow.com/questions/1775954/using-python-3-1-with-textmate

python3.1 # sample code to show version import sys print sys.version_info In many case you would prefer not to hardwire the absolute path..

How to organize Python modules for PyPI to support 2.x and 3.x

http://stackoverflow.com/questions/2398626/how-to-organize-python-modules-for-pypi-to-support-2-x-and-3-x

3 In the setup.py I had these lines near the top if sys.version_info 0 2 base_dir 'python2' elif sys.version_info 0 3 base_dir 'python3'.. the top if sys.version_info 0 2 base_dir 'python2' elif sys.version_info 0 3 base_dir 'python3' 4 In the call to setup I specified the..

What are “named tuples” in Python?

http://stackoverflow.com/questions/2970608/what-are-named-tuples-in-python

changes in Python 3.1 I found something... unexpected The sys.version_info tuple is now a named tuple I never heard about named tuples..

Best way to import version-specific python modules

http://stackoverflow.com/questions/342437/best-way-to-import-version-specific-python-modules

and in a few months be upgraded to python 2.5. This if sys.version_info 2 2 5 from string import Template else from our.compat.string..

Python install uninstall easy_install

http://stackoverflow.com/questions/3582715/python-install-uninstall-easy-install

Versions 2.6 bin python2.6 python2.6 c import sys print sys.version_info 2 6 5 'final' 0 sh setuptools 0.6c11 py2.6.egg Processing setuptools..

Python graceful future feature (__future__) import

http://stackoverflow.com/questions/388069/python-graceful-future-feature-future-import

directly and use the information in it along with sys.version_info to figure out where the release you're running under stands.. import sys major minor micro releaselevel serial sys.version_info if major minor 2 5 # provide advice on getting version 2.6 or.. sys if print_function in __future__ # Could also check sys.version_info __future__. print_function.optional import app app.main else..

Python: Best way to check for Python version in a program that uses new language features?

http://stackoverflow.com/questions/446052/python-best-way-to-check-for-python-version-in-a-program-that-uses-new-language

versions of Python. Consider this program import sys if sys.version_info 2 4 raise must use python 2.5 or greater else # syntax error..

Efficient way of parsing fixed width files in Python

http://stackoverflow.com/questions/4914008/efficient-way-of-parsing-fixed-width-files-in-python

2 or 3 import sys fieldstruct struct.Struct fmtstring if sys.version_info 0 3 parse fieldstruct.unpack_from else # converts unicode input..