Browse Source

Using image for code example in README.md

Alfio Puglisi 1 year ago
parent
commit
c4e6ce93af
3 changed files with 4 additions and 31 deletions
  1. 1 15
      README.md
  2. BIN
      docs/example_code.png
  3. 3 16
      docs/index.rst

+ 1 - 15
README.md

@@ -4,21 +4,7 @@ A tool for making simple Python GUIs
 
 Guietta is a tool that makes simple GUIs *simple*:
 
-
-    from guietta import _, Gui, Quit
-    
-    gui = Gui(
-        
-      [  'Enter numbers:', '__a__'  , '+' , '__b__',  ['Calculate'] ],
-      [  'Result:  -->'  , 'result' ,  _  ,    _   ,       _        ],
-      [  _               ,    _     ,  _  ,    _   ,      Quit      ]
-    )
-
-    with gui.Calculate:
-        gui.result = float(gui.a) + float(gui.b)
-        
-    gui.run()
-
+![Example code](http://guietta.com/_images/example_code.png)
 
 And here it is:
 

BIN
docs/example_code.png


+ 3 - 16
docs/index.rst

@@ -2,22 +2,9 @@
 Guietta!
 ========
 
-Guietta is a tool that makes simple GUIs *simple*::
-
-
-    from guietta import _, Gui, Quit
-    
-    gui = Gui(
-        
-      [  'Enter numbers:', '__a__'  , '+' , '__b__',  ['Calculate'] ],
-      [  'Result:  -->'  , 'result' ,  _  ,    _   ,       _        ],
-      [  _               ,    _     ,  _  ,    _   ,      Quit      ]
-    )
-
-    with gui.Calculate:
-        gui.result = float(gui.a) + float(gui.b)
-    
-    gui.run()
+Guietta is a tool that makes simple GUIs *simple*:
+
+.. image:: example_code.png
 
 
 And here it is: