cpython icon indicating copy to clipboard operation
cpython copied to clipboard

Permit import of .pyw under Linux

Open SmartAudioTools opened this issue 3 years ago • 0 comments

Feature or enhancement

To allow under Linux the execution of a script written under Windows, importing modules, some of which have the .pyw file extension, it would be useful to allow linux to import the .pyw files.

Pitch

Sometimes you want to run under linux a script written under windows which import modules, some having the file extension ".pyw". Today, we are forced to rename all pyw files to py to switch from Windows to Linux. But this is not always desirable, if you use a third party script or if you work cooperatively on a project, with developers under Windows and Linux. Moreover, there is no solution to recognize the py files to be renamed to pyw when you want to switch back to Windows.

Previous discussion

Importing .pyw files has been discussed here : https://mail.python.org/pipermail/patches/2001-August/005411.html And it is mentioned that "with slight modification, it could permit the extension on any platform if desired"

Another discussion on the subject : https://stackoverflow.com/questions/21386094/importing-pyw-files-as-modules-under-linux

SmartAudioTools avatar Oct 16 '22 10:10 SmartAudioTools