Sublime Forum

Doesn't execute codes properly

#1

I’m new to Sublime. I’m using Python3, I installed Sublime, changed the Build system to Python3. Verified it, and it shows it is accessing python3 library.

However, if I write a code that requires two input, it shows the first input, and when I enter a value, it doesn’t show me the second input.

The codes run ok in Terminal. But not in Sublime.

I have Mac, Catalina, using Zsh bash.

Thank you in advance.

0 Likes

#2
1 Like

#3

I just installed the SublimeREPL package. It didn’t help. Let me elaborate on that.

for example, this code:

name = input(‘What is your name?\n’)
print (‘Hi, %s.’ % name)

when I build it, it asks me what is your name, but whatever value I type, it doesn’t give me the output?

0 Likes

#4

I have no experience with SublimeREPL and generally recommend Terminus as a superior replacement.

However, when the build runs, is it still appearing in a panel at the bottom of the window, or is it actually opening in a REPL tab?

0 Likes

#5

I installed Terminus now too, no different.

It shows the build output in a panel at the bottom of the windows! Here is an

example.

0 Likes

#6

That’s still a standard build system; if it was using SublimeREPL it would be appearing in a tab. You also need to use a different method to launch the program.

All else being equal, I would recommend installing Terminus and using that for a build that you want to be interactive; it’s a lot easier to use (and is also better maintained).

This video shows how to use it to set up a Python environment for running interactive programs:

2 Likes

#7

Thank you so much. That fixed my issue. God bless you.

1 Like