Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 맛집
- python
- Linux
- GIT
- node.js
- 리눅스
- flutter
- 함수
- IOS
- urllib
- 라즈베리파이
- MySQL
- 다이어트
- sqlite
- PER
- 유니티
- swift
- mssql
- Excel
- Unity
- javascript
- port
- ASP
- MS-SQL
- PyQt5
- pandas
- tensorflow
- PyQt
- 날짜
- ubuntu
Archives
목록os.path.splitext(f)[1].lower() (1)
아미(아름다운미소)
Python directory search and counting by specific extensions
python 디렉토리 전체탐색후 특정확장자별로 카운트하기 # -*- coding: utf-8 -*- ''' Created on 2018. 9. 5. @author: bhm ''' import os from datetime import datetime class CGetAllFiles : def __init__( self ) : pass def getFiles( self , recdir ): x = 0 y = 0 for pack in os.walk(recdir): for f in pack[2]: if os.path.splitext(f)[1].lower() =='.wav': x += 1 if os.path.splitext(f)[1].lower() =='.mp3': y += 1 print ( ("Dir: %s..
랭귀지/PYTHON
2018. 9. 8. 11:00