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 | 31 |
Tags
- mssql
- Linux
- Unity
- Excel
- sqlite
- IOS
- ubuntu
- ASP
- PyQt
- python
- 유니티
- flutter
- node.js
- urllib
- GIT
- PyQt5
- swift
- javascript
- PER
- 맛집
- tensorflow
- 라즈베리파이
- 날짜
- pandas
- 리눅스
- MS-SQL
- port
- 다이어트
- MySQL
- 함수
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