How to open PYW files on macOS

喜夏-厌秋 提交于 2020-06-27 17:26:10

问题


So, I am extremely new to Python. I just downloaded a file from http://webprojects.eecs.qmul.ac.uk/fa303/pgs/tutorial.html. It is a PYW file. It is a recreation of the game Super Mario Brothers. I have Python 3 and Pygame already installed. The folder is on my desktop, and I am currently trying to figure out how I can run the game for a test.

Thank you.


回答1:


If you are on Windows, run the command "pythonw (name of PYW file)" from "cmd.exe". PYW files don't need cmd.exe so you can close out of it.
If you are on Linux or Mac OS X, just rename the PYW"example.PY" file to a PY file and run it from the console. Don't close the console here because it is no longer a PYW file. For the explanations, scroll down.

Explanations:

PYW files are just meant "Python Script Without Console". So running a PYW file will not show the console but running a PY file do show a console. PYW files only work in Windows and are not available in Mac and Linux systems.



来源:https://stackoverflow.com/questions/45976196/how-to-open-pyw-files-on-macos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!