일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 자바
- 노드
- PostgreSQL
- postgres
- 설치
- java
- 아틀라시안
- ubuntu
- 우분투
- install
- 윈도우
- 하모니카
- DB
- python
- 스크립트
- 파이썬
- DATABASE
- JS
- Atlassian
- 설정
- Windows
- script
- Linux
- javascript
- node
- 자바스크립트
- 데이터베이스
- 리눅스
- 3.0
- hamonikr
Archives
- Today
- Total
목록연결확인 (1)
LukeHan 의 잡다한 기술 블로그
Python 인터넷 연결 확인
#!/usr/bin/python3 import socket def fnt_internet(self, host, port, timeout): try: socket.setdefaulttimeout(timeout) socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((host, port)) return True except Exception as ex: print(ex) return False print(fnt_internet("8.8.8.8", 80, 3))
개발/Python
2020. 11. 15. 17:12