Python Window Service
https://bitcoder.tistory.com/m/116 python으로 windows service 만들기 1. 소스코드 다음은 소스코드입니다. import win32serviceutil import servicemanager import ctypes import sys import time OutputDebugString = ctypes.windll.kernel32.OutputDebugStringW class MyServiceFra.. bitcoder.tistory.com https://nick2ya.tistory.com/16 [Python] 파이썬 Windows 서비스 등록 이번 시간에는 파이썬으로 제작한 exe 실행파일을 Windows 서비스에 등록하여 실행시키는 방법에 대해 알아보도록 하겠..
- [====== Development ======]/Python
- · 2022. 8. 11.
Python 불필요한 패키지 자동삭제
pip install pip-autoremove
- [====== Development ======]/Python
- · 2022. 8. 4.

Flask REST API Server
from flask import Flask, request, jsonify, make_response from flask_restful import Api, Resource from wsgiref.simple_server import make_server app = Flask(__name__) api = Api(app) class Test1(Resource): def get(self): # response = make_response("Not Found" , 404) response = make_response( jsonify({ "code": 100, "success":True, "message": "Test1 Succes" }), 200 ) return response class Test2(Resou..
- [====== Development ======]/Python
- · 2022. 7. 29.

Python에서 Postgresql 접속하여 테이블 생성
import psycopg2 conn = psycopg2.connect(host='000.000.000.000', dbname='TestDb',user='postgres',password='XXXX',port=5432) cursor=conn.cursor() #Doping EMPLOYEE table if already exists. cursor.execute("DROP TABLE IF EXISTS EMPLOYEE") #Creating table as per requirement sql ='''CREATE TABLE EMPLOYEE( FIRST_NAME CHAR(20) NOT NULL, LAST_NAME CHAR(20), AGE INT, SEX CHAR(1), INCOME FLOAT )''' cursor.e..
- [====== Development ======]/Python
- · 2022. 7. 28.
Python 에서 문자열을 여러줄로 정의하는 방법
1. 따옴표 또는 작은 따옴표(" . ')로 묶어주기 : 공백과 줄바꿈 모두 포함됨 multi_line_string = """Line 1 Line 2 Line 3 Line 4""" print(multi_line_string) Line 1 Line 2 Line 3 Line 4 2. (string string string) 혁식으로 선언 : 문자열 사이의 줄바꿈은 자동추가되지 않음 multi_line_string = ("Line 1 " "Line 2 " "Line 3 " "Line 4") print(multi_line_string) Line 1 Line 2 Line 3 Line 4 출처 : https://codechacha.com/ko/python-multiple-string/ Python - 여러 줄로 문..
- [====== Development ======]/Python
- · 2022. 7. 28.
Pyhton 패키지 정보 저장및 한번에 설치하기
현재 소스의 사용중인 패키지를 requirments.txt파일로 추출하기 pip freeze > requirments.txt 저장된 requirments.txt 파일 addict==2.4.0 altgraph==0.17.2 aniso8601==9.0.1 base58==2.1.1 certifi==2022.6.15 charset-normalizer==2.1.0 click==8.1.3 colorama==0.4.5 crc==1.2.0 defusedxml==0.7.1 fast_ctc_decode==0.3.2 filelock==3.7.1 Flask==2.1.3 Flask-Cors==3.0.10 Flask-RESTful==0.3.9 future==0.18.2 소스를 처음 받은경우 패키지를 한번에 설치하기 위한 명령어 ..
- [====== Development ======]/Python
- · 2022. 7. 28.