python / python/cpython

Permit import of .pyw under Linux

Đang mở
#98,326 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

topic-importlib type-feature
Ngôn ngữ chính
Python
Star
77.2k
Fork
36k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Không có tệp triển khai, bài kiểm thử hoặc điểm vào nào được nêu. Trước tiên, hãy xem xét hành vi import của Python đối với các tệp .pyw trên Linux và hai cuộc thảo luận được liên kết; xác định hành vi đa nền tảng và thêm các bài kiểm thử thể hiện việc import thành công mà không yêu cầu đổi tên tệp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
operating-systems
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.