4 月 242024
 

Source: Python Program to Get Hostname

Overview

Python offers a wide range of networking-related applications. It is frequently used by developers as a means of communication with other users on your network. Hence, these communications require the hostname in Python. The hostname is the name that is provided to a device to identify it in a local network. Basically, by using the hostname, the machines can communicate within a network. In this article, we will learn about the Python get hostname function and various ways for the same.

Continue reading »
1 月 162024
 

Source: Python 以 ctypes 載入 DLL、SO 動態連結函式庫教學與範例

Python 的 ctypes 模組可以用來呼叫外部的函式庫,提供相容於 C 語言的資料型別,開發者可以透過這個模組直接呼叫 DLL 檔案(Windows 平台)或 SO 檔案(macOS 或 Linux 平台)中的函數。以下分別介紹 Windows 平台建立與使用 DLL 檔案、macOS 與 Linux 平台建立與使用 SO 檔案的步驟。

Continue reading »