Last active
August 29, 2015 14:06
-
-
Save oiojin831/68afb3edf7fe3d825c5a to your computer and use it in GitHub Desktop.
c9 flask helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' run server in c9 IDE ''' | |
from os import environ | |
if __name__ == '__main__': | |
app.run(host=environ['IP'], port=int(environ['PORT'])) | |
''' 한글 인코딩 ''' | |
# -*- coding: utf-8 -*- | |
''' setup.py 설정시 pip 명령어 ''' | |
# python setup.py develop | |
# pip freeze 하면 리스트 버전 까지보임 | |
# pip list 리스트 보임 | |
''' import 순서 ''' | |
# 단위가 큰거부터 불러오기 | |
# 내장 라이브러리 | |
# 한칸 띄고 외부 라이버러리 예를 들어 -pip 에서 가져오는 것들 | |
# 한칸 띄고 내부라이브러리 - 내가 만든파일들 | |
import os | |
import setuptools | |
from setuptools import setup | |
import app | |
''' python 파일 바로 실행 하도록 환경변수? ''' | |
#!/usr/bin/env python | |
# env가 command app 이고 지금 환경에서 쓰는 python을 쓰게 끔 해줌 | |
$ chmod a+x app.py | |
$ ./app.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment