Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #106512

Re: Import graphics error

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Dennis Lee Bieber <wlfraed@ix.netcom.com>
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 <mailman.66.1459859222.32530.python-list@python.org> (permalink)
References <CAO5nurM_6d+3Tz5-=uo1w_nVygFtuwatjejHvhfkUTD-DhvBoA@mail.gmail.com> <mailman.61.1459851765.32530.python-list@python.org> <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 <python-python-list@m.gmane.org>
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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <69b7gb12p62m7o9oabpiuo19ckdkj3v4u7@4ax.com>
X-Mailman-Original-References <CAO5nurM_6d+3Tz5-=uo1w_nVygFtuwatjejHvhfkUTD-DhvBoA@mail.gmail.com> <mailman.61.1459851765.32530.python-list@python.org> <5703946f$0$1612$c3e8da3$5496439d@news.astraweb.com>
Xref csiph.com comp.lang.python:106512

Show key headers only | View raw


On Tue, 05 Apr 2016 20:33:18 +1000, Steven D'Aprano <steve@pearwood.info>
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/

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Import graphics error Nicolae Morkov <morkovnicolae@gmail.com> - 2016-04-05 11:19 +0100
  Re: Import graphics error Steven D'Aprano <steve@pearwood.info> - 2016-04-05 20:33 +1000
    Re: Import graphics error Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-05 08:23 -0400

csiph-web