Enable absolute imports, true division, & print()
These have no effect in Python 3.x, they are the default. Enabling them in Python 2.x, enabling them in Python 2.x allows single source compatiblity.
This commit is contained in:
parent
55280a73ee
commit
0f3cadcc3e
17 changed files with 43 additions and 7 deletions
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
Import('env')
|
||||
|
||||
example = env.Clone()
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
# base64_sem1.py and base64_sem2.py for examples how to attach appropriate
|
||||
# semantic actions to the grammar.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import sys
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
# transform the parse tree in small steps in a bottom-up fashion. Compare
|
||||
# base64_sem2.py for an alternative approach using a single top-level action.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import functools
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
# for an alternative approach using a fine-grained piece-by-piece
|
||||
# transformation.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import functools
|
||||
import sys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue