๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ› ๏ธ ์ž๋™ํ™” ๋ฐ ์Šคํฌ๋ฆฝํŠธ/๐Ÿงฐ Python2

[Python] Windows ๋ฌด์„ ๋žœ ์–ด๋Œ‘ํ„ฐ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ / ํ™œ์„ฑํ™” ์ž‘์—… ๋ฐฐ๊ฒฝ์‚ฌ์šฉ์ž PC์˜ ๋ฌด์„ ๋žœ์„ ํ™œ์„ฑํ™” ํ•ด์•ผํ•˜๋Š”๋ฐ...Windows ๊ด€๋ฆฌ์ž ๊ถŒํ•œ์ด ์—†๊ณ  User ๊ถŒํ•œ์ด๋ผ๋ฉด ํ™œ์„ฑํ™”๊ฐ€ ๋˜์ง€ ์•Š๋Š”๋‹ค ๐Ÿ˜ฃ Python ์œผ๋กœ ๋ฌด์„ ๋žœ์„ ์กฐํšŒํ•ด์„œ ํ™œ์„ฑํ™” ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ์Šคํฌ๋ฆฝํŠธ๋ฅผ ๊ตฌ๊ธ€๋ง ํ•ด์„œ ๋š๋”ฑ๊ฑฐ๋ ธ๋‹ค.. ์žฅ์น˜๊ด€๋ฆฌ์ž์˜ ๋„คํŠธ์›Œํฌ ์–ด๋Œ‘ํ„ฐ ์ •๋ณด ๊ฐ€์ ธ์˜ค๊ธฐ- ์žฅ์น˜ ๊ด€๋ฆฌ์ž์—์„œ ํ‘œ์‹œ๋˜๋Š” ์–ด๋Œ‘ํ„ฐ ์ •๋ณด๋ฅผ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ๋‹ค.  import tkinter as tkimport wmidef show_network_adapters(): # ๊ฒฐ๊ณผ๋ฅผ ์ถœ๋ ฅํ•  ์ฐฝ ์ƒ์„ฑ result_window = tk.Tk() result_window.title("๋„คํŠธ์›Œํฌ ์–ด๋Œ‘ํ„ฐ ์ •๋ณด") # WMI ๊ฐ์ฒด ์ƒ์„ฑ c = wmi.WMI() # Win32_NetworkAdapter ์ฟผ๋ฆฌ networ.. 2024. 6. 30.
Telegram API๋ฅผ ํ™œ์šฉํ•œ bot ๋งŒ๋“ค๊ธฐ ์ด๋ฒˆ์—๋Š” Telegram ์„ ํ™œ์šฉํ•˜์—ฌ ํŠน์ •ํ•œ ์กฐ๊ฑด์ผ ๋•Œ ์•Œ๋ฆผ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ๋„๋ก ํ•˜๋Š” bot ์„ ๋งŒ๋“ค์–ด ๋ณด๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ์šฐ์„  Telegram ์—์„œ ๋ฉ”์‹œ์ง€๋ฅผ ๋ณด๋‚ผ ๊ณ„์ •(bot)์„ ๋งŒ๋“ค์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค 1. Telegram API ์ค€๋น„ํ•˜๊ธฐ 1.1. PC ์— ํ…”๋ ˆ๊ทธ๋žจ ์„ค์น˜ ํ›„ ๊ฒ€์ƒ‰์ฐฝ์— "BotFather" ๋ฅผ ๊ฒ€์ƒ‰ํ•ฉ๋‹ˆ๋‹ค. 1.2 ์„ ํƒ ํ›„ “/start” ๋ฅผ ์ž…๋ ฅ ์ „์†ก ํ•ฉ๋‹ˆ๋‹ค. 2. ์ƒˆ๋กœ์šด Telegram Bot ์„ ๋งŒ๋“ค ์ฐจ๋ก€! - “/newbot” ์ž…๋ ฅ ํ›„ ์›ํ•˜๋Š” bot์˜ ์ด๋ฆ„์„ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค. - Bot์˜ ์ด๋ฆ„์—๋Š” ‘bot’์ด๋ผ๋Š” ๋‹จ์–ด๊ฐ€ ํฌํ•จ๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. - ๋‘๋ฒˆ์งธ ๋นจ๊ฐ„ ๋ฐ•์Šค์˜ ๊ฐ’์ด ์ƒ์„ฑํ•œ ๋ด‡์˜ Token ์ž…๋‹ˆ๋‹ค. (๋‚˜์ค‘์— ํ™œ์šฉํ•ด์•ผํ•จ) 3. Telegram Bot “Chat ID” ํ™•์ธ ๋ฐฉ๋ฒ• 3.1 ์œ„ ์‚ฌ์ง„์˜ ์ฒซ๋ฒˆ์งธ.. 2022. 10. 19.