Sangjun 개발 블로그
    • 카테고리
    • Algorithm
    • Apple
    • AWS
    • Boto3
    • Cron
    • Crontab
    • Db
    • Django
    • Docker
    • Facebook
    • Fcm
    • Go
    • Google
    • Gopacket
    • Gui
    • Guide
    • Kakao
    • Learning
    • LeetCode
    • Linux
    • Logging
    • MariaDB
    • Models
    • MSSQL
    • Naver
    • NFS
    • Numpy
    • Oauth
    • Opencv
    • PostgreDB
    • Pytest
    • Python
    • Sniff
    • Swagger
    • Windows
    • Windows10
    • WSL
    Hero Image
    pyftpdlib 라이브러리 사용법 (pyftpdlib Library Guide)

    1. 라이브러리 설치 pip install pyftpdlib 실습 버전 : pyftpdlib 1.5.6 2. Server ftp server 실행 후 client 테스트 가능 from pyftpdlib.authorizers import DummyAuthorizer # 사용자 인증을 생성하는 모듈 from pyftpdlib.handlers import FTPHandler # 사용자 인증, 파일 전송, 로깅 등 FTP서버를 조작하는 모듈 # from pyftpdlib.handlers import TLS_FTPHandler from pyftpdlib.servers import FTPServer # FTP서버를 실행하는 모듈 # from pyftpdlib.servers import ThreadedFTPServer import os class FileServer: def __init__(self): self.ftpServerIP = "127.

    November 16, 2020
    Hero Image
    libmagic 라이브러리 사용법 (libmagic Library Guide)

    미디어 타입(media type), MIME 타입(MIME type) 1. 라이브러리 설치 실행환경 : windows 10 pip install libmagic pip install python-magic-bin 실행환경 : linux pip install libmagic pip install python-magic libmagic : 파일타입을 MIME 타입으로 확인해주는 라이브러리 python-magic-bin : 윈도우용 magic 라이브러리 python-magic : 리눅스용 magic 라이브러리 2. 예제 코드 import magic r1 = magic.from_file("test1.txt") r2 = magic.from_file("test1.txt", mime=True) print(f"filetype = {r1}, \nmime = {r2}") # filetype = UTF-8 Unicode text, with CRLF line terminators, # mime = text/plain file_data = open('test1.

    November 5, 2020
    • ««
    • «
    • 1
    • 2
    • »
    • »»
    바로가기
    • About
    • Recent Posts
    Contact me:
    • sangjuncha.dev@gmail.com

    Toha Theme Logo Toha
    Copyright 2020. SangjunCha all rights reserved.
    Powered by Hugo Logo