Vineesh TP
Vineesh TP

Reputation: 7963

How to create '.py' file in Mac

I want to create just a python file (.py) in mac.

Without using Pycharm or other IDE. I tried using 'TextEdit' but it didn't work.

Upvotes: 2

Views: 33605

Answers (2)

user8973071
user8973071

Reputation: 98

Press Save

Save file as myname.py

Unless I'm missing something?

EDIT

TextEdit has separate plain text and rich text modes. You'll have to select Format > Make Plain Text or set the default format to plain text first.

Upvotes: 6

Diablo
Diablo

Reputation: 442

Open terminal.

cd Documents
touch file_title.py

The file_title.py will be in your Documents folder.

Upvotes: 4

Related Questions