保存したPythonファイルの開き方です。Idle環境を前提としてますが、他のエディタでもやりかたは大差ないはずです。
Pythonファイルの開き方
ファイルで右クリック→Edit With Idle
![edit with idle python2](https://sunagitsune.com/wp-content/uploads/2022/01/edit-with-idle-python2.png)
作成したpyファイルの上で右クリックし、
![edit with idle python1](https://sunagitsune.com/wp-content/uploads/2022/01/edit-with-idle-python1.png)
Edit with IDLEにカーソルを合わせ、Edit With Idle x.xx(xx-bit)をクリックすると、Idleでファイルが開きます。
他のエディタを選ぶなら、プログラムから開くから指定できます。
他のエディタを選ぶなら、プログラムから開くから指定できます。
IdleでFile→Open
![edit with idle python4](https://sunagitsune.com/wp-content/uploads/2022/01/edit-with-idle-python4.png)
Idleを開き、ShellもしくはEditorウィンドウでFile→Openをクリックします。
![edit with idle python5](https://sunagitsune.com/wp-content/uploads/2022/01/edit-with-idle-python5-650x116.png)
保存したPythonファイルを選択し、開くをクリックします。
ドラッグ&ドロップ
![edit with idle python3](https://sunagitsune.com/wp-content/uploads/2022/01/edit-with-idle-python3.png)
これはIdleだと不可ですが、メモ帳などのテキストエディタではファイルを直接ドラッグ&ドロップすることで開くことができます。
メモ帳では前に開いていた内容を閉じて開き直すので、前の内容を保存してから実行します。
メモ帳では前に開いていた内容を閉じて開き直すので、前の内容を保存してから実行します。
![](https://sunagitsune.com/wp-content/uploads/2022/05/laptop-g2651bd324_1280-160x90.png)
Python操作方法、関数・メソッドリファレンス
使用用途別にまとめたPythonリファレンスページです。
初期準備、基本概念
ダウンロード、インストール、起動
ShellとEditor、保存、実行
保存したPythonの起動
コメント、docstring、行またぎ
コメント、...
コメント