Sublime Forum

No proper python output

#1

I am not getting any proper output for my python programs .Only first two three lines are executing for any python program I write(or atleast I see that in output console). I tried to run with default python build system and even with new python build system but problem remains the same . I do save my code also
For example: My code is :print(“Test”)
x = int(input(“Enter a number”))
print(x)
Output is :Test
Enter a number3 …and nothing happens
Please help

0 Likes

#2

You’re not doing anything wrong and that’s just normal and expected behaviour… If you run that snippet on your terminal everything will work fine, right? That’s mainly because Sublime doesn’t know how to handle stdin. I propose you something, replace your current snippet

print("Test")
x = int(input("Enter a number"))
print(x)

by

print("Test")
x = 3
print(x)

so you’ll realize the problem was the input function

For more details about it, you can check https://stackoverflow.com/a/10605079/3809375

3 Likes

#3

Thank you so much. But can you tell what other basic function sublime doesn’t support so that I won’t have to get in this situation again?

1 Like