Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81810
| Path | csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <joel.goldstick@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.141 |
| X-Spam-Level | * |
| X-Spam-Evidence | '*H*': 0.74; '*S*': 0.02; 'subject:create': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; '2:28': 0.16; 'subject: \n ': 0.16; 'subject:had': 0.16; 'subject:patch': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'header :In-Reply-To:1': 0.27; 'function': 0.29; 'dec': 0.30; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'supposed': 0.32; 'url:python': 0.33; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'should': 0.36; 'pm,': 0.38; 'url:mail': 0.40; 'above,': 0.60; 'response.': 0.68; 'results': 0.69; 'skip:r 30': 0.69; 'url:i': 0.72; 'subject:have': 0.80; 'subject:this': 0.83; 'url:jpg': 0.83; 'circles': 0.84; 'url:imgur': 0.84; 'joel': 0.91; 'to:none': 0.92 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=y9GyD7bOM02Tl++8nHb6B9eXQDNPr0vEIctumj73tDQ=; b=hOuCmZfKQuGzoCCA7bPVJ89Oqp8o8ngDelk/MlXhB9g24T2JJ5r4EZjX4ActmRTcNn aZADPtDFFOSMb+azJ48Uj2Bf7Hw8iXoBPeLsjMTsgUFQBNDStNzzuOe2S/htV5zk1Ee1 XOag6vlWrcq9/fuKzbYSZB6hiBOxEV1rZ1as9ib7y0KC1r4JJkgq6H909YUPrJIs18q0 GW3QImyrv49OnDtHXwGxqpp4ASc5w5eBwfxmBql/hOT/yOMC38iuTEtg2DiYavZdmD3K 3vUVfGC4eAflWFc3S+N25h23Y0Q/z7TJRELAJiLozGKsQgADJCzllSZu3yLdZQY7qbe5 L7TA== |
| MIME-Version | 1.0 |
| X-Received | by 10.224.4.197 with SMTP id 5mr1290590qas.74.1417548245464; Tue, 02 Dec 2014 11:24:05 -0800 (PST) |
| In-Reply-To | <6bfc3acd-0a71-4f76-a335-022d0a7fc535@googlegroups.com> |
| References | <6bfc3acd-0a71-4f76-a335-022d0a7fc535@googlegroups.com> |
| Date | Tue, 2 Dec 2014 14:24:05 -0500 |
| Subject | Re: i have to create this patch in python but wasnt having any luck i was wondering if anyone had a solution? |
| From | Joel Goldstick <joel.goldstick@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16500.1417548252.18130.python-list@python.org> (permalink) |
| Lines | 107 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1417548252 news.xs4all.nl 2848 [2001:888:2000:d::a6]:60107 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:81810 |
Show key headers only | View raw
On Mon, Dec 1, 2014 at 2:28 PM, python help required
<19aadan95@gmail.com> wrote:
> def penultimatePatch():
>
> win = GraphWin("Patch1",(100), 100)
> amountOfCircles = 5
>
> #Filled Red Circles
> fillCircle = Circle(Point(20,20)+100/amountOfCircles)
> fillCircle.draw(win)
> fillCircle.setFill("red")
>
> #Verticle white rectangles
> rectangleVerticle1 = Rectangle(Point(0,0), Point(10,100))
> rectangleVerticle1.setFill("white")
> rectangleVerticle1.setOutline("white")
> rectangleVerticle1.draw(win)
The above, and all below should be put in a function like so:
def rectangle_function(rectangle_name, Point(0,0), Point(10,100)):
#Verticle white rectangles
rectangle_name = Rectangle(Point(0,0), Point(10,100))
rectangle_name.setFill("white")
rectangle_name.setOutline("white")
rectangle_name.draw(win)
>
> rectangleVerticle2 = Rectangle(Point(41,0), Point(51,100))
> rectangleVerticle2.setFill("white")
> rectangleVerticle2.setOutline("white")
> rectangleVerticle2.draw(win)
>
> rectangleVerticle3 = Rectangle(Point(81,0), Point(91,100))
> rectangleVerticle3.setFill("white")
> rectangleVerticle3.setOutline("white")
> rectangleVerticle3.draw(win)
>
> #Horizontal white rectangles
> rectangleHorizontal = Rectangle(Point(21,11), Point(41,21))
> rectangleHorizontal.setFill("white")
> rectangleHorizontal.setOutline("white")
> rectangleHorizontal.draw(win)
>
> rectangleHorizontal = Rectangle(Point(61,11), Point(81,21))
> rectangleHorizontal.setFill("white")
> rectangleHorizontal.setOutline("white")
> rectangleHorizontal.draw(win)
>
> rectangleHorizontal = Rectangle(Point(21,31), Point(51,41))
> rectangleHorizontal.setFill("white")
> rectangleHorizontal.setOutline("white")
> rectangleHorizontal.draw(win)
>
> rectangleHorizontal = Rectangle(Point(81,31), Point(61,41))
> rectangleHorizontal.setFill("white")
> rectangleHorizontal.setOutline("white")
> rectangleHorizontal.draw(win)
>
> rectangleHorizontal = Rectangle(Point(21,51), Point(51,61))
> rectangleHorizontal.setFill("white")
> rectangleHorizontal.setOutline("white")
> rectangleHorizontal.draw(win)
>
> rectangleHorizontal = Rectangle(Point(61,51), Point(91,61))
> rectangleHorizontal.setFill("white")
> rectangleHorizontal.setOutline("white")
> rectangleHorizontal.draw(win)
>
> rectangleHorizontal = Rectangle(Point(21,71), Point(51,81))
> rectangleHorizontal.setFill("white")
> rectangleHorizontal.setOutline("white")
> rectangleHorizontal.draw(win)
>
> rectangleHorizontal = Rectangle(Point(61,71), Point(81,81))
> rectangleHorizontal.setFill("white")
> rectangleHorizontal.setOutline("white")
> rectangleHorizontal.draw(win)
>
> rectangleHorizontal = Rectangle(Point(21,91), Point(51,100))
> rectangleHorizontal.setFill("white")
> rectangleHorizontal.setOutline("white")
> rectangleHorizontal.draw(win)
>
> rectangleHorizontal = Rectangle(Point(61,91), Point(91,100))
> rectangleHorizontal.setFill("white")
> rectangleHorizontal.setOutline("white")
> rectangleHorizontal.draw(win)
>
> #Outlined Red circles
> fillCircle = Circle(Point(20,20)+100/amountOfCircles)
> fillCircle.draw(win)
> fillCircle.setOutline("red")
>
> it is supposed to create this design>>> http://i.stack.imgur.com/2dfGi.jpg
> --
> https://mail.python.org/mailman/listinfo/python-list
What results did you get? If you get a traceback, copy it completely
and paste it in your response.
--
Joel Goldstick
http://joelgoldstick.com
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
i have to create this patch in python but wasnt having any luck i was wondering if anyone had a solution? python help required <19aadan95@gmail.com> - 2014-12-01 11:28 -0800 Re: i have to create this patch in python but wasnt having any luck i was wondering if anyone had a solution? Joel Goldstick <joel.goldstick@gmail.com> - 2014-12-02 14:24 -0500
csiph-web