Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # コマンドプロンプトにおいてsysteminfo | clipと入力し
- # その出力を貼り付けたファイルsysteminfoデータ.txtが
- # このファイルと同一のディレクトリにあるとする
- with open('./systeminfoデータ.txt', 'r', encoding='UTF-8') as file:
- for line in file:
- if line[0:2] == 'OS':
- print(line, end='')
- print('ファイルの処理は以上です')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement