# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# import sys
# from salome.kernel import termcolor
# if termcolor.canDisplayColor(sys.stdout):
-# print termcolor.makeColoredMessage("Hello world!", termcolor.BLUE)
+# print(termcolor.makeColoredMessage("Hello world!", termcolor.BLUE))
# else:
-# print "Hello world!"
+# print("Hello world!")
# \endcode
# \}
import sys
from salome.kernel import termcolor
if termcolor.canDisplayColor(sys.stdout):
- print termcolor.makeColoredMessage("Hello world!", termcolor.BLUE)
+ print(termcolor.makeColoredMessage("Hello world!", termcolor.BLUE))
else:
- print "Hello world!"
+ print("Hello world!")
"""
"""Test function for termcolor module."""
import sys
if not canDisplayColor(sys.stdout):
- print "Standard output does not support colors."
+ print("Standard output does not support colors.")
return
- print makeColoredMessage("This message must appear in blue.", BLUE)
- print makeColoredMessage("This message must appear in red on green " +
- "background.", RED + GREEN_BG)
- print makeColoredMessage("This message must appear in magenta and " +
- "crossed-out.", PURPLE + ['09'])
+ print(makeColoredMessage("This message must appear in blue.", BLUE))
+ print(makeColoredMessage("This message must appear in red on green " +
+ "background.", RED + GREEN_BG))
+ print(makeColoredMessage("This message must appear in magenta and " +
+ "crossed-out.", PURPLE + ['09']))
# Main function only used to test the module