Sublime Forum

Newbie help

#1

total coding newbie, just install python and sublime text, windows desktop, working through Python crash course book by eric mattes.
1.Im not getting a terminal screen at the bottom of the sublime window
2. my text is all one colour, white, in the sublime window
3. and my ‘message’ wont print.

Ive reinstalled both programs, no change.

Help !!

jennifer

0 Likes

#2

Sublime Text by default doesn’t come with a integrated (built in) terminal, though it has build systems you can use to run single program files. Since you are a begineer, I’d suggest using a proper terminal like command prompt or powershell before using build systems. You will understand build systems better once you are comfortable with a terminal.

I believe you haven’t saved the file with the correct extension of .py. Once you save the file with an extension of .py, ST will understand you want to associate that file with the python syntax and you will automatically get syntax highlighting (color for the code).

I don’t want to discourage you but this is really vague. Either your program hasn’t run or there may be a syntax error or something else.

0 Likes

#3

Thank you for the reply.

  1. Can I save a file in a prompt screen ? I am trying to work through this book as per the instructions, it uses sublime text for all the execises and projects.

2 + 3 I have saved the file a few times to .py. I have gone over the instructions word for word today just to be sure. Somehow i have the colour back in my text, but I still cant get it to print (

Ive down loaded python v3.9 sublime v 3.2.2 windows 8.1pro 64 bit

i am totally discouraged this evening.

0 Likes

#4

Your file looks correctly named and saved and like Python code that’s valid [edit] Except for the issue pointed out by @jwortmann below; good catch! [/edit] . To run it, you’d need to use Tools > Build from the menu (or the key binding you see there) to actually try and run the code.

When prompted, make sure you choose Python and not Python - Check Syntax; the latter just compiles your code to check if it’s valid without actually running it.

Note that you need to have Python installed on your system for this to work; unlike some IDE’s, Sublime tries to run an already existing installation of Python, so if you don’t already have it installed the build won’t work.

0 Likes

#5

There also seems to be a syntax error in the screenshot; it needs to be message = "Hello Jennifer" (notice the string quotes).

1 Like

#6

thank you both for the replies, i do have python installed. jwortmann … i do see that error, thank you !

0 Likes