
import sys

__version__ = '0.2'

# python version check

# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
    py33 = True
    py27 = False
elif v >= (2, 7) and v < (3,):
    py33 = False
    py27 = True
else:
    raise Exception('This software runs on python versions 2.7 or >=3.3 only!')


import sys

__version__ = '0.2'

# python version check

# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
    py33 = True
    py27 = False
elif v >= (2, 7) and v < (3,):
    py33 = False
    py27 = True
else:
    raise Exception('This software runs on python versions 2.7 or >=3.3 only!')

	
# special hack for mako on windows to correct a nasty line ending problem
if py33 and sys.platform.startswith('win'):
	def read_file(path, mode='r'):
		fp = open(path, mode)
		try:
			data = fp.read()
			return data
		finally:
			fp.close()
	# hot patch loaded module :-)
	import mako.util
	mako.util.read_file = read_file
	del read_file

Add hot patching of mako at runtime to fix the line ending bug. This is just a temporary solution.
Add hot patching of mako at runtime to fix the line ending bug. This is just a temporary solution.

  
  import sys
  
  __version__ = '0.2'
  
  # python version check
  
  # please handle py27 a s a special case which may be removed later
  v = sys.version_info
  if v >= (3, 3):
      py33 = True
      py27 = False
  elif v >= (2, 7) and v < (3,):
      py33 = False
      py27 = True
  else:
      raise Exception('This software runs on python versions 2.7 or >=3.3 only!')
  
+ 	
+ # special hack for mako on windows to correct a nasty line ending problem
+ if py33 and sys.platform.startswith('win'):
+ 	def read_file(path, mode='r'):
+ 		fp = open(path, mode)
+ 		try:
+ 			data = fp.read()
+ 			return data
+ 		finally:
+ 			fp.close()
+ 	# hot patch loaded module :-)
+ 	import mako.util
+ 	mako.util.read_file = read_file
+ 	del read_file
+ 
Add hot patching of mako at runtime to fix the line ending bug. This is just a temporary solution.
## Code Before:

import sys

__version__ = '0.2'

# python version check

# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
    py33 = True
    py27 = False
elif v >= (2, 7) and v < (3,):
    py33 = False
    py27 = True
else:
    raise Exception('This software runs on python versions 2.7 or >=3.3 only!')

## Instruction:
Add hot patching of mako at runtime to fix the line ending bug. This is just a temporary solution.
## Code After:

import sys

__version__ = '0.2'

# python version check

# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
    py33 = True
    py27 = False
elif v >= (2, 7) and v < (3,):
    py33 = False
    py27 = True
else:
    raise Exception('This software runs on python versions 2.7 or >=3.3 only!')

	
# special hack for mako on windows to correct a nasty line ending problem
if py33 and sys.platform.startswith('win'):
	def read_file(path, mode='r'):
		fp = open(path, mode)
		try:
			data = fp.read()
			return data
		finally:
			fp.close()
	# hot patch loaded module :-)
	import mako.util
	mako.util.read_file = read_file
	del read_file
