forked from google/grumpy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from cclauss/patch-11
Some basic Python 3 compatibility in grumpy_tools
- Loading branch information
Showing
9 changed files
with
53 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
if sys.version_info[0] == 3: | ||
unichr = chr | ||
byte = lambda x: bytes([x]) | ||
long = int | ||
else: | ||
byte = chr | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import sys | ||
from __future__ import print_function | ||
|
||
|
||
def main(): | ||
print '__name__ is', __name__ | ||
print '__package__ is', __package__ | ||
print('__name__ is', __name__) | ||
print('__package__ is', __package__) | ||
from . import SPAM | ||
print(SPAM) | ||
|
||
|
||
if __name__ == '__main__': | ||
print '__name__ IS __main__' | ||
print '__package__ is', __package__ | ||
print('__name__ IS __main__') | ||
print('__package__ is', __package__) | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
print 'STARTING' | ||
from __future__ import print_function | ||
|
||
print('STARTING') | ||
from havingmainpkg.__main__ import main | ||
print 'IMPORTED' | ||
print('IMPORTED') | ||
|
||
main() | ||
print 'CALLED main()' | ||
print('CALLED main()') |