Merge pull request #14464 from benpicco/python3

Convert remaining Python2 users to Python3
This commit is contained in:
Francisco 2020-08-18 09:11:23 +02:00 committed by GitHub
commit d665546d6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 15 deletions

View File

@ -51,7 +51,7 @@ main() {
local output_dir local output_dir
# No 'realpath' in mac by default… # No 'realpath' in mac by default…
output_dir=$(python -c 'import os.path; print(os.path.abspath("'"$1"'"))') output_dir=$(python3 -c 'import os.path; print(os.path.abspath("'"$1"'"))')
for app in $(applications) for app in $(applications)
do do

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (C) 2014 René Kijewski <rene.kijewski@fu-berlin.de> # Copyright (C) 2014 René Kijewski <rene.kijewski@fu-berlin.de>
@ -19,22 +19,13 @@
# License along with this library; if not, write to the Free Software # License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
from __future__ import print_function
from collections import defaultdict from collections import defaultdict
from itertools import groupby from itertools import groupby
from os import devnull, environ from os import devnull, environ
from os.path import abspath, dirname, isfile, join from os.path import abspath, dirname, isfile, join
from subprocess import CalledProcessError, check_call, check_output, PIPE, Popen from subprocess import CalledProcessError, check_call, check_output, PIPE, Popen
from sys import argv, exit, stdout from sys import argv, exit, stdout
from io import StringIO
try:
# Python 2.x
from StringIO import StringIO
except ImportError:
# Python 3.x
from io import StringIO
from itertools import tee from itertools import tee

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# #
# ESP32 partition table generation tool # ESP32 partition table generation tool
# #
@ -20,7 +20,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function, division
import argparse import argparse
import os import os
import re import re

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
try: try:
from setuptools import setup from setuptools import setup