1

I am new to python. I am using ubuntu for software development using python. Here python extension in ubuntu.

ubuntu :

.py
.pyc

Windows:

?

Mac :

?

and also please explain the extensions.

  • 4
    They are the same, why should they be any different? – Matteo Italia Oct 28 '13 at 12:25
  • Guys this is not a duplicate, the OP wants to know if there are any differences, and if there are any, then to name them. – Games Brainiac Oct 28 '13 at 12:39
  • The link I gave goes into detail on each file extension (covering the "please explain the extensions") and notes that there are separate files such as the .pyd/.pyw. Admittedly, it does not explicitly state that there aren't special Mac files. – Dillon Welch Oct 28 '13 at 13:38

1 Answers1

5

They are the same. In both windows and mac, you have .py files and compiled .pyc files. They are the same on all operating systems.

You might also occasionally meet .pyo, which is the same as a .pyc but it has been optimized. What that means really is that all assert statements are removed (used in testing software).

However, .pyd is specifically for windows. You can learn more about it from here.

UPDATE

There is also .pyw for pythonw programs on Windows - these do not generate a Windows console

-- From cdarke

Games Brainiac
  • 80,178
  • 33
  • 141
  • 199