Sublime Forum

Output doesn't show even when clicking "Build with" MACOSX PYTHON

#1

Hi all,

So I have read countless of related discussions in regards to my problem but nothing fixes it.

Basically, when i type simple calculations, there is no output except “[Finished in 0.1s]”
For example:

  1. age = 20
    age == 20
  2. 5 + 5

I am currently using my build Python 3 and when I hit build with , no options comes out. And when I try build (cmd + B), the same “[Finished in 0.1s]” appears.

Im not sure if this has to do with the way I added the python 3 build or when I set up the Python Development Environment in sublime text.

Thank you in advance for your help,

0 Likes

#2

Your program doesn’t print anything. Try print(5 + 5).

1 Like

#3

Thank you sir!
However, I thought that you could print those statements without the need to add the “print” function.

0 Likes

#4

That only works in a REPL type environment (Read-Evaluate-Print Loop); running code interactively in the Python interpreter works this way, as does entering Python code into the console in Sublime.

When you use a build system to run anything, Sublime runs the code externally and shows you what it outputs; in this mode you can’t interact with the program at all, just run it. So in that case if your code doesn’t explicitly provide some sort of result, it will appear as if it doesn’t do anything.

There is a SublimeREPL package that provides an interactive environment for several languages (Python is one of them) that might come in handy.

1 Like

newb*-Condiotional Test
#5

Perfectly explained. Thank you @OdatNurd

0 Likes