1

I have Lubuntu. Like version 14.04 i think. Its supported till 2019 i do know that. I have python installed i think. I type "python3" into the terminal and it just allows me to code in the terminal. I can't find the interpreter anywhere. Is the interpreter what I want to be able to compile the code, and write multiple lines of code?

VoyagerLinuxGamer
  • 123
  • 2
  • 3
  • 14
  • related [run-python-in-terminal](https://askubuntu.com/questions/244378/run-python-in-terminal) – Ravan Nov 02 '15 at 14:48
  • I have the feeling you are looking for Idle, a python IDE? Python is an interpreted language btw. – Jacob Vlijm Nov 02 '15 at 16:50
  • Hi voyager, just curious, but did you take a look at idle? I am pretty much it is what you are looking for: type your code or script, press f5 to test-run the code and check for errors. Typing into gedit and check via terminal seems a clumsy detour. – Jacob Vlijm Nov 03 '15 at 14:45

3 Answers3

4

open or create any file with name .py for example

gedit test.py 

write code to this file

print('Hello, world!')

save and close file and execute code like:

python3 test.py
pl_rock
  • 11,067
  • 7
  • 41
  • 41
4

The Python3 interpreter is located under /usr/bin/python3.x.

For future reference you can easily find python or any other executable locations by using the whereis command :

whereis python3
cl-netbox
  • 30,845
  • 7
  • 93
  • 131
hg8
  • 13,410
  • 12
  • 71
  • 103
-1

You could download a text editor such as gedit. It will allow you to program in the editor with certain functionality such as bracket matching and syntax highlighting. To install, run:

sudo apt-get install gedit

Once it's done, you can open the program and start coding.

Chelsea
  • 19
  • 1
  • 2