Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83560
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <davea@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.040 |
| X-Spam-Evidence | '*H*': 0.92; '*S*': 0.00; 'float': 0.07; 'referring': 0.07; 'subject:files': 0.09; 'subject:using': 0.09; 'integer.': 0.16; 'length,': 0.16; 'subject:Generate': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'orientation': 0.24; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'subject:) ': 0.29; "i'm": 0.30; 'code': 0.31; 'correctly.': 0.31; 'lists': 0.32; '(e.g.': 0.33; '(i.e.': 0.33; 'subject: (': 0.35; 'possible': 0.36; 'january': 0.37; 'list': 0.37; 'minimum': 0.38; 'thank': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'length': 0.61; 'making': 0.63; 'email addr:gmail.com': 0.63; 'zip': 0.64; 'received:74.208': 0.68; '2015': 0.84 |
| Date | Sun, 11 Jan 2015 15:16:58 -0500 |
| From | Dave Angel <davea@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Generate jpg files using line length (pixels) and orientation (degrees) |
| References | <0f51bd21-7b0a-4ea0-8b13-27b1967d3b41@googlegroups.com> <m8mv27$k6e$2@dont-email.me> <m8nfs8$k6e$3@dont-email.me> <1ae2a5c4-78ae-4831-ac01-b886e92c0468@googlegroups.com> <m8sgai$k48$1@dont-email.me> <70bd0c94-9336-4ab2-adc0-3fd93af25e2d@googlegroups.com> |
| In-Reply-To | <70bd0c94-9336-4ab2-adc0-3fd93af25e2d@googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:P2M5zzXvx+/HD1q73IJ5wxeUGz6SOM2bmfKYhOTLh0V aq0anuimuudFberSd/M608C8p3z0ybDJJ8xvAnyH2BKx/ILyAu qcyyx8omZuPL6+Xv8D6H/Kzbl29GoL7bRvLRC1XxsgB7XHJMLZ cZ0lVLNzFJg+aQOJQKKRLzAZryNy+ap0gCj/2x4tbpQv1CRGNB vfwhJU1HSQcdhVzz6gNE9qG2HkmGVXmV+yT0xd/wRi/WYynsZD GY8onAPFnilKhNokjoRHkox5RxrdU0SFZbsb+Pg+l9r2aPz6Uq tUHik7BYZfMHr5sWA9xBnwR+EhDXi9n4GjkCoMYYQaBS58uJPb t1kvAMHtaA4wJaQOnb4c= |
| X-UI-Out-Filterresults | notjunk:1; |
| 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.17592.1421007429.18130.python-list@python.org> (permalink) |
| Lines | 24 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1421007429 news.xs4all.nl 2920 [2001:888:2000:d::a6]:41198 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:83560 |
Show key headers only | View raw
On 01/11/2015 02:41 PM, semeon.risom@gmail.com wrote:
> On Saturday, 10 January 2015 21:31:25 UTC-6, Denis McMahon wrote:
>> # using lists of values
>> for length in a:
>> for orientation in b:
>> makeimg(length, orientation)
>>
>> --
>> Denis McMahon, denismfmcmahon@gmail.com
>
> The code is working correctly. Thank you! The only change I had to make was referring to it as a float instead of an integer.
>
> The images are generating, however I'm noticing that it's making an image for every possible pair in each list (i.e. Image 1: a1 and b1; Image 2: a1 and b2; Image 3: a1 and b3....) instead of an image for each row (e.g. Image 1: a1 and b1; Image 2: a2 and b2; Image 3: a3 and b3...).
>
The minimum change for that would be to zip the lists together:
for length, orientation in zip(a,b):
makeimg(length, orientation)
--
DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Generate jpg files using line length (pixels) and orientation (degrees) semeon.risom@gmail.com - 2015-01-08 09:09 -0800
Re: Generate jpg files using line length (pixels) and orientation (degrees) Denis McMahon <denismfmcmahon@gmail.com> - 2015-01-08 22:07 +0000
Re: Generate jpg files using line length (pixels) and orientation (degrees) Denis McMahon <denismfmcmahon@gmail.com> - 2015-01-09 02:54 +0000
Re: Generate jpg files using line length (pixels) and orientation (degrees) semeon.risom@gmail.com - 2015-01-09 09:49 -0800
Re: Generate jpg files using line length (pixels) and orientation (degrees) Joel Goldstick <joel.goldstick@gmail.com> - 2015-01-09 13:18 -0500
Re: Generate jpg files using line length (pixels) and orientation (degrees) semeon.risom@gmail.com - 2015-01-09 13:51 -0800
Re: Generate jpg files using line length (pixels) and orientation (degrees) Dan Sommers <dan@tombstonezero.net> - 2015-01-09 22:21 +0000
Re: Generate jpg files using line length (pixels) and orientation (degrees) Dave Angel <davea@davea.name> - 2015-01-09 17:23 -0500
Re: Generate jpg files using line length (pixels) and orientation (degrees) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-09 22:41 +0000
Re: Generate jpg files using line length (pixels) and orientation (degrees) Denis McMahon <denismfmcmahon@gmail.com> - 2015-01-11 00:32 +0000
Re: Generate jpg files using line length (pixels) and orientation (degrees) semeon.risom@gmail.com - 2015-01-11 11:41 -0800
Re: Generate jpg files using line length (pixels) and orientation (degrees) Denis McMahon <denismfmcmahon@gmail.com> - 2015-01-11 19:56 +0000
Re: Generate jpg files using line length (pixels) and orientation (degrees) Dave Angel <davea@davea.name> - 2015-01-11 15:16 -0500
csiph-web