Commit d6298471 by heffnercj

Binwalk installs and shows help output in python3; fixing dict.iteritems is next.

parent 6988048f
# All Python 2/3 compatibility stuffs go here. # All Python 2/3 compatibility stuffs go here.
from __future__ import print_function from __future__ import print_function
import sys
import string
if sys.version_info.major > 2:
import urllib.request as urllib2
string.letters = string.ascii_letters
else:
import urllib2
import os import os
import urllib2
from binwalk.config import * from binwalk.config import *
from binwalk.compat import * from binwalk.compat import *
......
...@@ -133,6 +133,7 @@ setup( name = "binwalk", ...@@ -133,6 +133,7 @@ setup( name = "binwalk",
scripts = ["bin/binwalk"], scripts = ["bin/binwalk"],
) )
# THIS BREAKS WHEN INSTALLING WITH PYTHON3; PROPER PYTHON3 SUPPORT IS IN PROGRESS.
# If python2 exists, replace the shebang to invoke python2. # If python2 exists, replace the shebang to invoke python2.
# This prevents python3 from being used when running binwalk. # This prevents python3 from being used when running binwalk.
# This shouldn't be done on the ./bin/binwalk file, as that would # This shouldn't be done on the ./bin/binwalk file, as that would
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment