Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- maven
- COC
- gwt
- MySQL
- SVN
- bootstrap jquery datepicker
- spring transaction
- spring jpa
- Drools Fusion
- custom filter
- gwt-ext
- jquery serialize
- GEventEvaluator
- rember me
- jquery
- JPA
- java tip
- ibatis
- guvnor
- JBoss Seam
- jstl
- jenkins
- CEP
- Hudson
- querydsl
- Spring
- drools
- spring security
- @SqlResultSetMapping
- zabbix
Archives
- Today
- Total
봉 블로그
python tip 본문
# script 파일을 업로드하고 mode 변경후 실행하기 (fabric 사용)
put(open(mainDir + '/commands.txt'), 'commands.sh', mode=0755)
result = run('./commands.sh', pty=False, combine_stderr=True)
# json 파일 pretty print
python -m json.tool ./core/spidercore/vms.json
logger.debug(json.dumps(nics, indent=4))
#파일 앞뒤 2줄씩 삭제하고 리턴
list = file_contents.split('\n')
return "\n".join(list[2: len(list)-2])
#good logging practice in python
http://victorlin.me/posts/2012/08/26/good-logging-practice-in-python
#__init__.py의 용도 (기초)
# Exception Hierarchy
https://docs.python.org/3/library/exceptions.html#exception-hierarchy
# Manually rase Exception
http://stackoverflow.com/questions/2052390/how-do-i-manually-throw-raise-an-exception-in-python