Files
Iristyle a000ce8acc feat(ST2.UtilPackages): bump up all packages
- Refresh PackageCache with latest versions of everything
2013-09-16 22:35:46 -04:00

21 lines
488 B
Python

import sys
def console_write(string, prefix=False):
"""
Writes a value to the Sublime Text console, encoding unicode to utf-8 first
:param string:
The value to write
:param prefix:
If the string "Package Control: " should be prefixed to the string
"""
if sys.version_info < (3,):
if isinstance(string, unicode):
string = string.encode('UTF-8')
if prefix:
sys.stdout.write('Package Control: ')
print(string)