2016년 4월 30일 토요일

(python) tips

import sys
sys.path
sys.path.append('c:\\python\\pathtest')
sys.path.remove('c:\\python\\pathtest')

set PYTHONPATH=c:\python
>>map(lambda apath: apath.find('pathtest'), sys.path)
[-1, -1, -1, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]

import numpy as np
dir(), dir(np)

import pdb
pdb.set_trace()
n(step next), s(step in), run
print var

(package 작성 예)
path 연결
import sys
sys.path.append('c:\\python')
(또는 set PYTHONPATH=c:\....)

python 실행 후 path 확인하기 위해
import sys
map(lambda ap: ap.find('pathtest'), sys.path)

사용하기 위해
from pathtest.keras.imgproc import misc as mymisc

가능한 명령확인 위해
dir(mymisc)


[출처]
1. python modules
2. Jump to python - 패키지
3. python debugger- pdb


댓글 1개:

  1. However, you may not find it in the same way as different devices are now developing with the latest OS. Hence there is a bit change that comes with every segment like the ringtone stored location. Therefore, in this article, we are going to let you know the different devices custom places so that you come to know yours.

    Did you ever try to know where are android ringtones stored? No worries we come with the answer for you. Well, the ringtone is stored in your phone’s folder system>>Media>>Audio and finally you may get to see the ringtones.

    Hopefully, you have already come to know where are ringtones stored on Android. We have shown up a definitive guideline to you in which you can sort out where they go. Depends on your device type it may have some differences and we already shared those too.

    답글삭제