Python

環境

PyCharm 2021.3Python 3.9.2

書式
変数名 = 辞書型.copy()
copy関数を使って、辞書型(dictionary)をコピーします。
使用例

# 辞書型(di ...

Python

環境
PyCharm 2021.3
Python 3.9.2

構文
shutil.copytree(コピー元フォルダのパス,コピー先フォルダのパス)
フォルダをコピーし、なおかつフォルダ名も ...

Python

環境

PyCharm 2021.3Python 3.9.2

構文
shutil.copytree(コピー元フォルダのパス,コピー先フォルダのパス)
「shutil.copytree」を使ってフォルダをコピーし ...

Python

環境
PyCharm 2021.3
Python 3.9.7

構文
send2trash.send2trash(削除するファイルのパス)

使用例

import send2trash ...

Python

環境

PyCharm 2021.3Python 3.9.7

書式
os.unlink(‘c:\\path1\\path2\\ファイル名’)
「\」をエスケープする必要があるため、「\」 ...

Python

環境
PyCharm 2021.3
Python 3.9.7

書式
リスト =os.listdir(‘フォルダのパス’)
listdir関数を使ってフォルダのフォルダ ...

Python

環境

PyCharm 2021.3Python 3.9.7

書式
os.listdir(‘フォルダのパス’)
listdir関数を使ってフォルダの中のフォルダ・ファイルを取得します。 ...

Python

環境

PyCharm 2021.3Python 3.9.7

書式
os.listdir(フォルダのパス)
listdir関数を使ってフォルダの中のファイルを取得します。
「\」をエスケープする必要があ ...

CSS

環境
Google Chrome 103.0.5060.134
Windows 10 home 64bit
構文
border-left-color: 色の値 ;

使用例
左枠の色に ...

Python

環境
PyCharm 2021.3
Python 3.9.7

構文
タプル名 =(要素1,要素2,…)
リスト名 = list(タプル名)
list関数を使ってタプル(t ...

Python

環境
PyCharm 2021.3
Python 3.9.7

構文
os.listdir(ファイルパスの変数名)
listdir関数で指定ファイルパスのファイルをすべて取得します。

Python

環境
PyCharm 2021.3
Python 3.9.7

構文
リスト名 =
タプル名 =tuple(リスト名)
tuple関数を使ってリスト(list)をタプル(tuple)に ...

Python

環境
PyCharm 2021.3
Python 3.9.2

書式
変数名 = psutil.win_service_get(‘fhsvc’)
変数名.binpath ...

Python

環境
Python 3.9.7
Windows 10 Home 64bit

パッケージ「openpyxl」のインストール手順
1.pipバージョンを確認します

c:\>pip --ver ...

Python

環境
PyCharm 2021.3
Python 3.9.2

書式
変数名 = psutil.win_service_get(サービス名)
変数名.status()
psutil.w ...

Python

環境

PyCharm 2021.3Python 3.9.7

書式
変数名 = psutil.disk_usage(‘/’)

変数名.total ディスクの容量変数名.used   ディス ...

Python

環境
pythonバージョンを確認します

c:\>python --versionPython 3.9.7

Windows 10 Home 64bit

パッケージ「Python-Docx」のインスト ...

Python

環境
PyCharm 2021.3
Python 3.9.2

書式
psutil.win_service_get(‘fhsvc’)
psutil.win_servic ...