TAILIEUCHUNG - Graphical user interfaces for Python programs Phần 4

Mã này có thể sẽ có một chút phức tạp hơn trong thực tế, tôi có thể thấy một vài vấn đề tiềm năng như tôi đang viết bài này (tôi có thể viết "Tôi để lại này như tập thể dục để bạn có thể xác định vấn đề với mã này"). * Sau khi cây đã được xây dựng, chúng tôi thiết lập lại cờ inhibitDraw và hiển thị cây. | We scan the disk finding all files with recognizable extensions and add the nodes to the tree files imgs for file in files r ext file cont icon ext None None if cont icon icon name file action This code would probably be a little more complex in reality I can see a couple of potential problems as I m writing this I could write I leave this as an exercise for you to identify problems with this code . Once the tree has been built we reset the inhibitDraw flag and display the tree 0 That probably seems like a lot of code but the resulting browser provides a highly-acceptable interface. In addition users will understand the interface s navigation and it is readily adaptable to a wide range of data models. Running with a Python built with PIL will display a screen similar to the one in figure . Figure Image browser BROWSERS .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.