티스토리 뷰

Programming/Python

Python : PyCharm 프로젝트 만들고, 실행

파란크리스마스 2024. 8. 12. 15:41
728x90

[File] > [New Project...] 메뉴 선택

실행 환경 설정

main.py 소스

# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.


def print_hi(name):
    # Use a breakpoint in the code line below to debug your script.
    print(f'Hi, {name}')  # Press Ctrl+F8 to toggle the breakpoint.


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    print_hi('PyCharm')

# See PyCharm help at https://www.jetbrains.com/help/pycharm/

실행

상단에 Run 버튼 선택

실행 결과

D:\workspace.python\Example1\venv\Scripts\python.exe D:\workspace.python\Example1\main.py 
Hi, PyCharm
댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
글 보관함