from png import *

#  Following methods are not parts of API and imports only for unittest
from png import _main
from png import strtobytes
try:
    from png import *
    #  Following methods are not parts of API and imports only for unittest
    from png import _main
    from png import strtobytes
except ImportError:
    _png = __import__(__name__ + '.png')
    _to_import = _png.png.__all__
    _to_import.extend(('_main', 'strtobytes'))
    for it in _to_import:
        locals()[it] = eval('_png.png.' + it)

Fix compatibility with absolute import of Py3
Fix compatibility with absolute import of Py3

+ try:
- from png import *
+     from png import *
+     #  Following methods are not parts of API and imports only for unittest
+     from png import _main
+     from png import strtobytes
+ except ImportError:
+     _png = __import__(__name__ + '.png')
+     _to_import = _png.png.__all__
+     _to_import.extend(('_main', 'strtobytes'))
+     for it in _to_import:
+         locals()[it] = eval('_png.png.' + it)
  
- #  Following methods are not parts of API and imports only for unittest
- from png import _main
- from png import strtobytes
Fix compatibility with absolute import of Py3
## Code Before:
from png import *

#  Following methods are not parts of API and imports only for unittest
from png import _main
from png import strtobytes
## Instruction:
Fix compatibility with absolute import of Py3
## Code After:
try:
    from png import *
    #  Following methods are not parts of API and imports only for unittest
    from png import _main
    from png import strtobytes
except ImportError:
    _png = __import__(__name__ + '.png')
    _to_import = _png.png.__all__
    _to_import.extend(('_main', 'strtobytes'))
    for it in _to_import:
        locals()[it] = eval('_png.png.' + it)
