background preloader

PYTHON

Facebook Twitter

Tkinter Summary

Python & Database programming. Programming. GUI. BeginnersGuide/Overview - PythonInfo Wiki. Python is a clear and powerful object-oriented programming language, comparable to Perl, Ruby, Scheme, or Java.

BeginnersGuide/Overview - PythonInfo Wiki

Some of Python's notable features: Uses an elegant syntax, making the programs you write easier to read. Is an easy-to-use language that makes it simple to get your program working. This makes Python ideal for prototype development and other ad-hoc programming tasks, without compromising maintainability. Comes with a large standard library that supports many common programming tasks such as connecting to web servers, searching text with regular expressions, reading and modifying files. Some programming-language features of Python are: A variety of basic data types are available: numbers (floating point, complex, and unlimited-length long integers), strings (both ASCII and Unicode), lists, and dictionaries. See the SimplePrograms collection of short programs, gradually increasing in length, which show off Python's syntax and readability. Data Structures and Algorithms with Object-Oriented Design Patterns in Python.

GuiProgramming - PythonInfo Wiki. Python has a huge number of GUI frameworks (or toolkits) available for it, from TkInter (traditionally bundled with Python, using Tk) to a number of other cross-platform solutions, as well as bindings to platform-specific (also known as "native") technologies.

GuiProgramming - PythonInfo Wiki

Cross-Browser Frameworks Cross-Platform Frameworks The major cross-platform technologies upon which Python frameworks are based include Gtk, Qt, Tk and wxWidgets, although many other technologies provide actively maintained Python bindings. Platform-specific Frameworks GUI Design Tools and IDEs CameronLaird's personal notes on Python GUIs includes over 25 links to toolkits and techniques for connecting python with a GUI. Opendocs previously had some material on Qt programming with Python for on-line reading, but ownership of the domain appears to have lapsed. . - Wikipedia article describing several IDE's and GUI Builders. Editorial Notes. Installation on Windows — Kivy v1.0.8-dev documentation. For Windows, we provide what we call a ‘portable package’.

Installation on Windows — Kivy v1.0.8-dev documentation

This is the easiest way to get Kivy running as you don’t have to install anything “system” wide. You can just unzip & run it. This installation method is simple because it bundles the Python interpreter together with the Kivy environment and libraries. If you wish to install Kivy into an existing Python environment or install the development environment, please see the Other Environments section below. Installing the portable version Download the latest version from Unzip the package In the folder where you unzipped the package, you have a script called kivy.bat.

Start a Kivy Application. Learn to Program, by Chris Pine. A Place to Start for the Future Programmer I guess this all began back in 2002.

Learn to Program, by Chris Pine

I was thinking about teaching programming, and what a great language Ruby would be for learning how to program. I mean, we were all excited about Ruby because it was powerful, elegant, and really just fun, but it seemed to me that it would also be a great way to get into programming in the first place. Unfortunately, there wasn't much Ruby documentation geared for newbies at the time. Some of us in the community were talking about what such a "Ruby for the Nuby" tutorial would need, and more generally, how to teach programming at all.

And it wasn't very good. What saved me was that I made it really easy for people to contact me, and I always tried to help people when they got stuck. A couple of years later, it was getting pretty good. :-) So good, in fact, that I was ready to pronounce it finished, and move on to something else. Thoughts For Teachers About the Original Tutorial Acknowledgements. The Tkinter Entry Widget. The Entry widget is a standard Tkinter widget used to enter or display a single line of text.

The Tkinter Entry Widget

When to use the Entry Widget The entry widget is used to enter text strings. This widget allows the user to enter one line of text, in a single font. To enter multiple lines of text, use the Text widget. Patterns To add entry text to the widget, use the insert method. E = Entry(master) e.pack() e.delete(0, END) e.insert(0, "a default value") To fetch the current entry text, use the get method: s = e.get() You can also bind the entry widget to a StringVar instance, and set or get the entry text via that variable: v = StringVar() e = Entry(master, textvariable=v) e.pack() v.set("a default value") s = v.get() This example creates an Entry widget, and a Button that prints the current contents:

TkInter - PythonInfo Wiki. Tkinter is Python's de-facto standard GUI (Graphical User Interface) package.

TkInter - PythonInfo Wiki

It is a thin object-oriented layer on top of Tcl/Tk. Tkinter is not the only GuiProgramming toolkit for Python. It is however the most commonly used one. CameronLaird calls the yearly decision to keep TkInter "one of the minor traditions of the Python world. " The Tkinter wiki: