Extremely Newbie wants to program and pleads to be pointed in the right direction

Jeff Shannon jeff at ccvcorp.com
Thu Feb 28 14:52:42 EST 2002


Chris wrote:

> Can you do ordinary 2D graphics stuff without VPython - simply using the
> ordinary Python?

Sort of, depending on just what sort of graphics you want, and how
complicated you want to make them.

Core Python doesn't include any direct graphics support, because it's
intended to run on a wide variety of different computers, which handle
graphics in totally different ways (and in some cases, have *no* screen on
which to draw graphics!).  So no matter what, you'll need to use *some*
toolkit for your graphics.  The standard Python distribution *does* ship with
one such toolkit -- it's called Tkinter.  It (like many of the toolkits
available) is intended mostly for creating GUIs (graphical user interfaces --
think "windows programs" instead of "Console (DOS-box) programs"), but it
does include plain-old-drawing support.  (Look especially at the Canvas
widget).  Tkinter isn't the most powerful or flexible toolkit around, but
it's okay, and seems to fairly easy to pick up.

However, just because of the nature of cross-platform graphics and GUIs,
doing graphics is not necessarily an easy place to begin.  The Basic that
you're used to, made simple graphics easy by expecting to only ever be run on
that single platform; Python tries to be much more flexible and widely
applicable, but this does make this one particular aspect a bit harder to get
started in.  (But if you're trying to do anything *more* than toy examples,
Python is *much* easier!)  So don't necessarily rush straight for the
graphics toolkits -- spend a bit of time playing with text-only programs.
You can still do quite a bit, and have a lot of fun, without ever touching
graphics at all.

If you want to see some code examples, project suggestions, etc, you might
want to look at Useless Python (www.lowerstandard.com/python).  There's also
a Python Tutor mailing list
(http://www.python.org/psa/MailingLists.html#tutor), where there's lots of
people who will answer any questions you might have, at *any* level of
ability.

Enjoy!

Jeff Shannon
Technician/Programmer
Credit International





More information about the Python-list mailing list