Open In App

Open files from the command line – PyCharm

Last Updated : 11 Dec, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

PyCharm is one of the most popular Python-IDE developed by JetBrains and used for performing scripting in Python language. PyCharm provides some very useful features like Code completion and inspection, Debugging process, etc. In this article, we will see how we can open files from the command line in PyCharm.

Open Files from the Command Line in PyCharm

Step 1: Open PyCharm

Launch PyCharm on your computer. You can refer PyCharm Introduction to get an overview of it.

Step 2: Open Terminal

Open the terminal of the PyCharm as shown in the figure below.

one-(1)-(1)

Step 3: Navigate to your Directory

Navigate to you directory with the help of commands. Some commonly used command for navigating directory are as follow:

i) cd – Change directory.

cd directory_name

ii) ls – List files and directories in the current directory.

ls

iii) cd.. – change the current directory to the parent directory

cd..

two-(1)-(1)

Step 4: Open file

Once you reached in your desired directory just enter the file name in terminal and press “enter”. The file will be open in the default editor.

three-(1)-(1)

Note : You can change you default editor from the setting of “default apps”.

By this way we can easily navigate to the file and directory in the PyCharm with the help of command line.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads