From: Sunggyu Choi Date: Tue, 7 Feb 2023 04:44:39 +0000 (+0900) Subject: Update script files to support python3 X-Git-Tag: accepted/tizen/unified/20230208.112455~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1866f3124c5fbf06245c92202683b1d7eb5bf75;p=platform%2Fcore%2Fapi%2Fcommon.git Update script files to support python3 Change-Id: I0277cfb691deedc904083f17c8c295fd93c4af8c Signed-off-by: Sunggyu Choi --- diff --git a/tool/find_differences.py b/tool/find_differences.py index 0092d3a..58f2d4b 100755 --- a/tool/find_differences.py +++ b/tool/find_differences.py @@ -4,7 +4,7 @@ import sys def usage(): - print "Usage: find_differences.py OLD_FILE NEW_FILE" + print( "Usage: find_differences.py OLD_FILE NEW_FILE" ) @@ -22,18 +22,18 @@ def main(): file2.close() removed = lines1 - lines2 - print "\n" - print ">>>> Removed" + print( "\n" ) + print( ">>>> Removed" ) for i in removed: print("%s\n" %i) added = lines2 - lines1 - print "\n" - print ">>>> Added" + print( "\n") + print( ">>>> Added" ) for i in added: - print("%s\n" %i) + print( "%s\n" %i ) if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/tool/make_msg_header.py b/tool/make_msg_header.py index 13c58fa..a374115 100755 --- a/tool/make_msg_header.py +++ b/tool/make_msg_header.py @@ -28,17 +28,17 @@ fp.write( "} err_info;\n\n" ) fp.write( "static err_info err_list[] = {\n" ); for root, dirs, files in os.walk( msgpath ): for file in files: - print ">>>> " + file + print( ">>>> " + file ) targetXML = open( os.path.join( msgpath, file ) ) tree = parse( targetXML ) - errorroot = tree.getroot() + errorroot = tree.getroot() for error in errorroot.findall( "error" ): fp.write( "\tERR_ENTRY(\"" ) fp.write( error.get( "name" ) + "\", ") fp.write( error.findtext( "value" ) + ", \"" ) fp.write( error.findtext( "msg" ) + "\"),\n" ) - print error.get( "name" ) + print( error.get( "name" ) ) fp.write( "\t{0, NULL, NULL}\n" ) fp.write( "};\n" ) @@ -54,4 +54,4 @@ if not os.path.isdir( privatepath ): os.mkdir( privatepath ) # os.remove( privatepath + "tizen_error_private.h" ) -# shutil.move( headerpath, privatepath ) \ No newline at end of file +# shutil.move( headerpath, privatepath )