Executing Specific Python Lines in VS Code on Ubuntu

  • Context: Python 
  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Code Python Visual
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
member 428835
Hi PF!

I am running VS Code for python on Ubuntu. Is there a way to execute a specific python line? As I currently have it set up, on the terminal input at the bottom of the screen, I can only work through the terminal, so a command like print('hello world') won't do anything.

THanks so mcuh!
 
Physics news on Phys.org
Your title should be Visual Studio PYTHON code. VS runs lots of different codes (VB, C++, etc)
 
Reply
  • Like
Likes   Reactions: member 428835
joshmccraney said:
Hi PF!

I am running VS Code for python on Ubuntu. Is there a way to execute a specific python line? As I currently have it set up, on the terminal input at the bottom of the screen, I can only work through the terminal, so a command like print('hello world') won't do anything.

THanks so mcuh!
If you have python installed and your PATH set up properly, simply typing “python” in your terminal should start the interpreter.
 
Reply
  • Like
Likes   Reactions: pbuk