Sublime Forum

Special characters in sublime text terminal

#1

Consider the following bit of python code

print('This is a test of the \rcarriage return')

print ('\033[92m' + "test1")
print ('\033[91m' + "test2")

In a standard linux terminal, this outputs:

Screenshot%20from%202022-03-22%2009-31-20

Using the standard python build system in sublime text:

    This is a test of the 
    carriage return
    <0x1b>[92mtest1
    <0x1b>[91mtest2
    [Finished in 36ms]

Is there some way use special characters in the sublime text console? Alternatively, can an alternative build system just output to a native terminal?

0 Likes

#2

Sublime Text doesn’t contain a terminal emulator, when building it simply outputs the data directly. This is why there is also no input.

0 Likes

#3

Something like this is possible from within Sublime using Terminus:

image

The README for Terminus includes instructions on how to set up a build like this; the following video also demonstrates it directly; it’s part of this interactive build system playlist which also includes videos on getting builds to execute in external windows.

1 Like