2020-10-01から1ヶ月間の記事一覧

How to import Python from relative path

For example, we have a file with the following structure: pkg/ __init__.py libs/ some_lib.py __init__.py components/ code.py __init__.py if we want to call in code.py libs/some_lib.py module, such as using relative call: from.. Libs.some_l…

Golang gets the list of files under the folder

golang document it is easier to find a method is filepath. Walk, this method has a problem of the current directory is automatically recursive traversal subdirectory, in fact, we usually just want to get a directory file list below, does n…