Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: Import graphics error Date: Tue, 05 Apr 2016 08:23:30 -0400 Organization: IISS Elusive Unicorn Lines: 36 Message-ID: References: <5703946f$0$1612$c3e8da3$5496439d@news.astraweb.com> <69b7gb12p62m7o9oabpiuo19ckdkj3v4u7@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 37Dwll+7kP7YChh2IEyOPgFS/z9uJocrgjJ114F+LXFg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'main()': 0.07; 'message- id:@4ax.com': 0.09; 'pause': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:error': 0.11; 'template': 0.11; 'def': 0.13; '"python': 0.16; '(well,': 0.16; '100,': 0.16; '2016': 0.16; '>on': 0.16; 'creation.': 0.16; 'library"': 0.16; 'main():': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:graphics': 0.16; 'wrote:': 0.16; 'url:home': 0.18; 'creates': 0.18; 'library': 0.20; 'second': 0.24; 'import': 0.24; 'url:edu': 0.24; "doesn't": 0.26; 'header:X-Complaints-To:1': 0.26; 'launch': 0.29; 'window': 0.30; 'url:python': 0.33; "d'aprano": 0.33; 'hopefully': 0.33; 'steven': 0.33; 'surprised': 0.33; 'tue,': 0.34; 'but': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset :us-ascii': 0.37; 'to:addr:python.org': 0.40; 'programs': 0.62; 'introduction': 0.63; 'different': 0.63; 'book.': 0.72; 'click': 0.76; '+1000,': 0.84; 'subject:Import': 0.84; 'url:graphics': 0.84; 'dennis': 0.91; 'graphical': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: adsl-108-68-177-167.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <69b7gb12p62m7o9oabpiuo19ckdkj3v4u7@4ax.com> X-Mailman-Original-References: <5703946f$0$1612$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:106512 On Tue, 05 Apr 2016 20:33:18 +1000, Steven D'Aprano declaimed the following: >On Tue, 5 Apr 2016 08:19 pm, Nicolae Morkov wrote: > >> # This program creates a graphics window with a rectangle. It provides the >> 3 # template used with all of the graphical programs used in the book. > >What book? > Hopefully not "Python Programming: An Introduction to Computer Science" as the first hit ( http://mcsp.wartburg.edu/zelle/python/graphics/graphics/node1.html ) for "python graphics library" doesn't match the calls (well, the second hit, the first hit was a demo program -- which surprised me as Firefox appeared to launch it!) >From the above documentation: -=-=-=-=- from graphics import * def main(): win = GraphWin("My Circle", 100, 100) c = Circle(Point(50,50), 10) c.draw(win) win.getMouse() # pause for click in window win.close() main() -=-=-=-=- Same library name as the OP, but different window creation. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/