Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Nicolae Morkov Newsgroups: comp.lang.python Subject: Import graphics error Date: Tue, 5 Apr 2016 11:19:59 +0100 Lines: 35 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de LXpwrLYfUd+LXzMg9cn8kALDaGgOeE8qOcM2sdZrUqKQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.023 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'importerror:': 0.05; 'canvas': 0.07; 'canvas.': 0.09; 'subject:error': 0.11; 'template': 0.11; '*and': 0.16; '30)': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'skip:" 70': 0.16; 'subject:graphics': 0.16; 'creates': 0.18; 'library': 0.20; 'import': 0.24; '(most': 0.24; 'module': 0.25; 'installed': 0.26; 'error': 0.27; 'message- id:@mail.gmail.com': 0.27; "skip:' 10": 0.28; 'window': 0.30; 'traceback': 0.33; 'file': 0.34; 'received:google.com': 0.35; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'skip:& 10': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'close': 0.61; 'programs': 0.62; '20,': 0.66; 'book.': 0.72; "'graphics'": 0.84; 'subject:Import': 0.84; 'graphical': 0.91; 'skip:& 80': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=vGOUoQNKosLnYTmdcIUPaiICUwJJG7GdhPhBboSa9rM=; b=rPpt6zmCtGL1WTaUQ1c/lKVWcf95rrS3Y0gGSUhY+WRCWI4a1wmWu2hjTgV7wqy9l3 gQzex+eu92X1PApUqF3qFAGlGRyYr9shNLkWOOxZ7anUhbLTzrcI6jnC2wVlEqcxGp+L FVY2obmSG/ygL585vUNORcr4JvBFoW+0+p0TjzZQRfwnBv1L7piBM88wrnE7zwhZP+0b 0k/wiUMlsPtClF51BooCM/M59mV75QxbpM7gHRIzLsg2GZvHMnMBwMMslsFsksSTT94U iHs8hPT84bWGVzZ15yneg8L5APwvxw4nyHqActPvZfkh1tGU57sdpjhbfiZn0yJBlCmm 9w3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=vGOUoQNKosLnYTmdcIUPaiICUwJJG7GdhPhBboSa9rM=; b=DruP1wHTmrBeHM9Dj1wWA39YD7lJeSieI29reSAx+fdVXjz4VLpg+BTbrwUPS1L8B6 wFn4iVxjs/ouycBuD+jC4NRIxbStrn2xizKBZMGwcOr50h01Oqkiux4Q8o9O5XEpsrnj /oFPq7ss7wawh/y3Bpi8vOv0VdepvL3jcz8R/2DkdsaBhz6mQ/YYWL/UGnsAZmZp52wU t6TEmcQsRG9tFbPnxktiZRpfRItL53ten2bCbNfpMVp1yZanhq6oZhilQAGmg8h/IvlL P7+1KRFaTuBEwYJKROL/vrEaMKAlBnxOLJJvW8FCyF6sMun//L7WcN0lHaTBUgcolVQy x2QQ== X-Gm-Message-State: AD7BkJIcezN0FWeBYzLUTNNLxTh9iznQ4TB+/8n0cVwGQAnXPez+orBp6R7p4KVQv64SwbswfsrQxx/c4lSI1A== X-Received: by 10.50.85.14 with SMTP id d14mr15928770igz.49.1459851599543; Tue, 05 Apr 2016 03:19:59 -0700 (PDT) X-Mailman-Approved-At: Tue, 05 Apr 2016 06:22:44 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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: Xref: csiph.com comp.lang.python:106505 # 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. 4 # 5 6 from graphics import GraphicsWindow 7 8 # Create the window and access the canvas. 9 win = GraphicsWindow() 10 canvas = win.canvas() 11 12 # Draw on the canvas. 13 canvas.drawRect(5, 10, 20, 30) 14 15 # Wait for the user to close the window. 16 win.wait() *This is the error I get* Traceback (most recent call last): File "C:/Users/Nicolae/AppData/Local/Programs/Python/Python35/pythonK/pr.py", line 1, in from graphics import GraphicsWindow ImportError: No module named 'graphics' *And when I installed graphic library the error was :* Traceback (most recent call last): File "C:/Users/Nicolae/AppData/Local/Programs/Python/Python35/pythonK/pr.py", line 1, in from graphics import GraphicsWindow ImportError: cannot import name 'GraphicsWindow'