Feedback - PythonGTK 2.1 Simple Example
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 文件
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- python
研究方向
從開頭部分和 PythonGTK 2.1 Simple Example 開始,找出引用的有關 GTK 版本、視窗大小和 signal/callback 的段落。檢視周圍的教學結構,並判斷所要求的說明是否符合現有範圍;完成表示文法已修正,相關遺漏也已獲得一致處理。
由索引模型根據 Issue 內容生成。
描述
- There is a grammatical error in the text which explains the fact that it is possible to have different GTK libraries installed concurrently. The text states,
"Since a user’s system can have multiple versions of GTK+ installed at the same, we want to make sure that when we import Gtk that it refers to GTK+ 3..."
It should instead read,
"Since a user’s system can have multiple versions of GTK+ installed at the same time, we want to make sure that when we import Gtk that it refers to GTK+ 3..."
- One key element not explained in the example is the fact that the preliminary text clearly states, "This program will create an empty 200 x 200 pixel window" (which it does), but there is simply no explanation in the "simple example" to help a reader understand how those specific dimensions were chosen.
I do appreciate that this is the very first example of code you are giving to a reader and also that it is sensible to not overload the reader with too much detail in an initial example. But maybe there is a compromise you would consider... which would be to say something along the lines of: When a window is created without any explicit size defined - as is the case here - GTK will default to using {whatever the correct explanation is}, which we will cover in more detail in Chapter {wherever you are going to cover it}. Don't leave your reader hanging with such an obvious gap...
- In the opening section of this documentation, the text notes the following,
"This tutorial gives an introduction to writing GTK+ 3 applications in Python.
Prior to working through this tutorial, it is recommended that you have a reasonable grasp of the Python programming language. GUI programming introduces new problems compared to interacting with the standard output (console / terminal). It is necessary for you to know how to create and run Python files, understand basic interpreter errors, and work with strings, integers, floats and Boolean values. For the more advanced widgets in this tutorial, good knowledge of lists and tuples will be needed."
I hope this doesn't come across as argumentative, but I would respectfully suggest that the concept of signals and callbacks - which you implicitly touch on with the 7th line in the first Hello World example...
win.connect("destroy", Gtk.main_quit)
From the point of technical correctness, I must of course concede that signals and callbacks are part of Python's Object Oriented programming paradigm and are thus not unique to programming for a GUI environment. But I would also argue that signals and callbacks extend beyond "a reasonable grasp of the Python programming language". Specifically, given the significant, explicit dependency that Gtk programming has on these language elements, I would like to suggest that it might be helpful to have an "explainer", somewhere near the beginning of this text, which introduces the key differences between programming for a graphical interface (e.g. event-driven programming) and programming for a command line interface (which is essentially batch or script programming, e.g. program-driven code).
I am still very much in the early stages of this journey and far from being qualified to tell you what to write, but I think a "key differences" 'explainer' would be of real benefit.
Thank you.
- 主要語言
- Python
- 星號
- 392
- 分支
- 157
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
我們還沒有檢查這個專案的環境設定檔。先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
sebp/PyGObject-Tutorial 的其他 Issue
-
難度 5/5 一週以上 新手友好度 20/100
sebp/PyGObject-Tutorial#229 ·
-
難度 3/5 1-2 天 新手友好度 35/100
sebp/PyGObject-Tutorial#219 ·
-
難度 2/5 1-3 小時 新手友好度 45/100
sebp/PyGObject-Tutorial#218 ·
-
難度 2/5 1-3 小時 新手友好度 52/100
sebp/PyGObject-Tutorial#210 ·
-
難度 2/5 1-3 小時 新手友好度 45/100
sebp/PyGObject-Tutorial#206 ·
查看 sebp/PyGObject-Tutorial 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 72/100
letsencrypt/cp-cps#353 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 84/100
PedestrianDynamics/pyFDS-Evac#394 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
DOI-USGS/pywatershed#421 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
python-pillow/Pillow#10087 · 1 則留言 ·
維護者通常 1 天內回覆