Erlang dict模組使用

2021-10-05 18:08:12 字數 291 閱讀 1312

dict: new() -> dictionary():生成乙個新的原始字典(其實是返回乙個內部定義的dict記錄record)

dict: fetch_keys(dict) -> keys:以列表的形式返回字典裡所有的鍵

dict: find(key, dict) -> | error:根據key查詢返回乙個在dict字典裡跟鍵相關聯的value,返回的值為,如果不存在這個key則只返回乙個原子error

部分摘自:

Python使用模組Pyserial模組報

用pip安裝pyserial後 sudo h pip install pyserial,執行新建的程式,名稱為serial.py,程式中用到 import serial.toos.list ports,但總是提示importerror no module named tools.list ports...

python os模組使用

os.sep 可以取代作業系統 特定的路徑分割符 os.linesep 字串給出當前平台使用的行終止符。例如,windows使用 r n linux使用 n 而mac使用 r os.name 字串指示你正在使用的平台。比如對於windows,它是 nt 而對於linux unix使用者,它是 pos...

Httplib模組使用

httplib是乙個相對底層的http請求模組,其上有專門的包裝模組,如urllib內建模組,goto等第三方模組,但是封裝的越高就越不靈活,比如urllib模組裡請求錯誤時就不會返回結果頁的內容,只有頭資訊,對於某些需要檢測錯誤請求返回值的場景就不適用,所以就得用這個模組了。vrequest se...