IISPL
Intelligent Information & Signal Procesing Lab.
Dept. of Computer Engineering, Hanbat National University, South Korea
[
로그인
]
Lab. Info.
About
Services
About me
Research
Members
Projects
IRP
Course
LecturelList
Schedule
Student list
Info.
Lecture Board
LabInfo
Membership
Log in
Regist
Modify
Find account
Gallery
Learning Gallery
YJK'S Gallery
Links
Mypage
Sechedule
커뮤니티
게시판전체
Python
Python/TensorFlow
NOTICE
자유게시판
강좌게시판
WEB-PROG
DP 알림판
C.P.
WebSC
SR Board(V)
OS전체
COMPILER
SSE
DSP
Multimedia
C#
Notice
데이터로표현하는세상
CMPLg RPT
방명록
자료모음
LAB Board
Python
제목:
vs code 계층적 모듈 참조
1828 김윤중
vs code 모듈 참조
방법1
import sys
from pathlib import Path
sys.path[0] = str(Path(sys.path[0]).parent)
folder 구조
yolov3
utils.py
tools
a.py 의 내용
from pathlib import Path
sys.path[0] = str(Path(sys.path[0]).parent)
from yolov3.utils imprt Print
Print('log.txt')
Print('message')
방법2
launch.json 설정
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File (integrated)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"env": {
"PYTHONPATH": "${workspaceRoot}"
}
}
]
}