mirror of
https://github.com/dnet/pySSTV.git
synced 2026-01-11 19:20:12 +01:00
fix python 2/3 compatibility for xrange->range
This commit is contained in:
parent
c2c6dbe541
commit
7cf3ddf770
|
|
@ -1,7 +1,12 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import division
|
||||
from builtins import range # python 2/3 compatibility
|
||||
try: # python 2/3 compatibility
|
||||
xrange # will fail in python 3
|
||||
except NameError:
|
||||
pass
|
||||
else:
|
||||
range = xrange
|
||||
from pysstv.sstv import byte_to_freq, FREQ_BLACK, FREQ_WHITE, FREQ_VIS_START
|
||||
from pysstv.grayscale import GrayscaleSSTV
|
||||
from itertools import chain
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import division
|
||||
from builtins import range # python 2/3 compatibility
|
||||
|
||||
try: # python 2/3 compatibility
|
||||
xrange # will fail in python 3
|
||||
except NameError:
|
||||
pass
|
||||
else:
|
||||
range = xrange
|
||||
from pysstv.sstv import SSTV, byte_to_freq
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,13 @@ try:
|
|||
import itertools.izip as zip # python 2
|
||||
except ImportError:
|
||||
pass # python 3
|
||||
from builtins import range # python 2/3 compatibility
|
||||
from itertools import cycle, chain
|
||||
try: # python 2/3 compatibility
|
||||
xrange # will fail in python 3
|
||||
except NameError:
|
||||
pass
|
||||
else:
|
||||
range = xrange
|
||||
from array import array
|
||||
import wave
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue