1
1
""" The CLI entry point for exporting projects from the mbed tools to any of the
2
2
supported IDEs or project structures.
3
3
"""
4
+ from __future__ import absolute_import , print_function
4
5
import sys
5
6
from os .path import join , abspath , dirname , exists , basename
6
7
ROOT = abspath (join (dirname (__file__ ), ".." ))
@@ -191,15 +192,15 @@ def main():
191
192
192
193
# Print available tests in order and exit
193
194
if options .list_tests is True :
194
- print '\n ' .join ([str (test ) for test in sorted (TEST_MAP .values ())])
195
+ print ( '\n ' .join ([str (test ) for test in sorted (TEST_MAP .values ())]) )
195
196
sys .exit ()
196
197
197
198
# Only prints matrix of supported IDEs
198
199
if options .supported_ides :
199
200
if options .supported_ides == "matrix" :
200
201
print_large_string (mcu_ide_matrix ())
201
202
elif options .supported_ides == "ides" :
202
- print mcu_ide_list ()
203
+ print ( mcu_ide_list () )
203
204
exit (0 )
204
205
205
206
# Only prints matrix of supported IDEs
@@ -212,9 +213,9 @@ def main():
212
213
readme .write ("\n " )
213
214
readme .write (html )
214
215
except IOError as exc :
215
- print "I/O error({0}): {1}" .format (exc .errno , exc .strerror )
216
+ print ( "I/O error({0}): {1}" .format (exc .errno , exc .strerror ) )
216
217
except :
217
- print "Unexpected error:" , sys .exc_info ()[0 ]
218
+ print ( "Unexpected error:" , sys .exc_info ()[0 ])
218
219
raise
219
220
exit (0 )
220
221
@@ -253,7 +254,7 @@ def main():
253
254
project_id = options .program , zip_proj = zip_proj ,
254
255
build_profile = profile , app_config = options .app_config )
255
256
except NotSupportedException as exc :
256
- print "[ERROR] %s" % str (exc )
257
+ print ( "[ERROR] %s" % str (exc ) )
257
258
258
259
if __name__ == "__main__" :
259
260
main ()
0 commit comments