uwsgi.ini
[uwsgi]
pythonpath = /Library/Python/2.7/site-packages
env = APPLICATION_SETTINGS= ...
uwsgi 실행
uwsgi uwsgi.ini -s uwsgi/uwsgi.sock -w main:app> flask.log
include uwsgi_params;
uwsgi_pass unix: /tmp/uwsgi.sock;
nginx 실행
2013년 7월 25일 목요일
2013년 7월 17일 수요일
2013년 7월 16일 화요일
emacs + python에서 auto indent
(add-hook 'python-mode-hook '(lambda () (define-key python-mode-map "\C-m" 'newline-and-indent)))
emacs python할때 현재 폴더에 있는 모듈을 불러오지 못할때.
http://stackoverflow.com/questions/2658475/python-mode-import-problem
.emace.d/init.el에
(defun python-reinstate-current-directory ()
"When running Python, add the current directory ('') to the head of sys.path.
For reasons unexplained, run-python passes arguments to the
interpreter that explicitly remove '' from sys.path. This means
that, for example, using `python-send-buffer' in a buffer
visiting a module's code will fail to find other modules in the
same directory.
Adding this function to `inferior-python-mode-hook' reinstates
the current directory in Python's search path."
(python-send-string "sys.path[0:0] = ['']"))
(add-hook 'inferior-python-mode-hook 'python-reinstate-current-directory)
위와 같이 추가
.emace.d/init.el에
(defun python-reinstate-current-directory ()
"When running Python, add the current directory ('') to the head of sys.path.
For reasons unexplained, run-python passes arguments to the
interpreter that explicitly remove '' from sys.path. This means
that, for example, using `python-send-buffer' in a buffer
visiting a module's code will fail to find other modules in the
same directory.
Adding this function to `inferior-python-mode-hook' reinstates
the current directory in Python's search path."
(python-send-string "sys.path[0:0] = ['']"))
(add-hook 'inferior-python-mode-hook 'python-reinstate-current-directory)
위와 같이 추가
2013년 6월 12일 수요일
jython setting
#!/bin/bash
. /Users/skplanet/TOOL/grinder-3.11/bin/setGrinderEnv.sh
for jarfile in `ls $GRINDERPATH/lib/*.jar`; do
CLASSPATH="$jarfile:$CLASSPATH"
done
export CLASSPATH
java -classpath $CLASSPATH org.python.util.jython $1
. /Users/skplanet/TOOL/grinder-3.11/bin/setGrinderEnv.sh
for jarfile in `ls $GRINDERPATH/lib/*.jar`; do
CLASSPATH="$jarfile:$CLASSPATH"
done
export CLASSPATH
java -classpath $CLASSPATH org.python.util.jython $1
2013년 5월 8일 수요일
mac os 에서 톰캣으로 돌릴때 java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence 나면 해결 방법
http://stackoverflow.com/questions/1663571/how-to-set-utf8-lang-on-tomcat-java-running-on-mac-os-10-5-8
CATALINA_OPTS="-Dfile.encoding=UTF-8"
CATALINA_OPTS="-Dfile.encoding=UTF-8"
피드 구독하기:
글 (Atom)