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


Groups > comp.lang.python > #35711

Re: Wrapping statements in Python in SPSS

Path csiph.com!usenet.pasdenom.info!news.albasani.net!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.nosignal.org!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <alankrinsky@gmail.com>
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; 'subject:Python': 0.05; 'indicating': 0.05; 'valueerror:': 0.07; 'python': 0.09; 'alan': 0.09; 'friday,': 0.09; 'src,': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'dec': 0.15; 'sat,': 0.15; 'chris,': 0.16; 'incomplete': 0.16; 'sources,': 0.16; 'wrote:': 0.17; 'code,': 0.18; 'issue.': 0.20; 'suggested': 0.20; 'bit': 0.21; '"",': 0.22; 'context.': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'tried': 0.25; 'least': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; '(most': 0.27; 'am,': 0.27; 'possibly': 0.27; 'chris': 0.28; 'ball': 0.29; 'loop,': 0.29; 'that.': 0.30; 'error': 0.30; 'code': 0.31; 'december': 0.32; 'file': 0.32; 'could': 0.32; 'traceback': 0.33; 'skip:d 20': 0.34; 'received:google.com': 0.34; 'received:209.85': 0.35; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'end': 0.40; 'think': 0.40; 'your': 0.60; 'from:no real name:2**0': 0.60; "you'll": 0.62; 'more': 0.63; 'show': 0.63; 'here': 0.65; 'gave': 0.65; 'excessive': 0.84; 'measure,': 0.84
Newsgroups comp.lang.python
Date Fri, 28 Dec 2012 09:33:39 -0800 (PST)
In-Reply-To <mailman.1400.1356714756.29569.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=160.79.139.10; posting-account=egMkHAoAAADMT4BkILtuIRdIfguep-XT
References <7fcd8949-c781-425c-b6d2-7d0a634b12b7@googlegroups.com> <mailman.1397.1356711013.29569.python-list@python.org> <596420c8-b88c-4b4d-89d9-a0c22ac7180b@googlegroups.com> <mailman.1400.1356714756.29569.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 160.79.139.10
MIME-Version 1.0
Subject Re: Wrapping statements in Python in SPSS
From alankrinsky@gmail.com
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.1402.1356716558.29569.python-list@python.org> (permalink)
Lines 40
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1356716558 news.xs4all.nl 6927 [2001:888:2000:d::a6]:37695
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:35711

Show key headers only | View raw


I think 396 just comes from the end of the Python loop, without indicating which line in the loop is at issue.

Here is the full code from this section of the loop:


for (
    msr, brk, dmn, src, dspd1, dspd2, dspd3, dspd4, dspd5, dspd6, dspd7, dspd8, dspd9, dspd10, dspd11, dspd12, 
    period1, period2, period3, period4, period5, period6, period7, period8, period9, period10, period11, period12 
) in zip(
    Measure, BreakVariable, Dimension, Sources, DimensionSourceTimeFrame1, DimensionSourceTimeFrame2, DimensionSourceTimeFrame3, DimensionSourceTimeFrame4, 
    DimensionSourceTimeFrame5, DimensionSourceTimeFrame6, DimensionSourceTimeFrame7, DimensionSourceTimeFrame8, DimensionSourceTimeFrame9, 
    DimensionSourceTimeFrame10, DimensionSourceTimeFrame11, DimensionSourceTimeFrame12, 
    TimeFrame1, TimeFrame2, TimeFrame3, TimeFrame4, TimeFrame5, TimeFrame6, TimeFrame7, TimeFrame8, TimeFrame9, TimeFrame10, TimeFrame11, TimeFrame12
): 


     spss.Submit(r"""


Alan


On Friday, December 28, 2012 12:12:27 PM UTC-5, Chris Angelico wrote:
> On Sat, Dec 29, 2012 at 3:43 AM, alan wrote: > Chris, > > I tried placing in the format you suggested and received this error message: > > END PROGRAM. > Traceback (most recent call last): > File "<string>", line 396, in <module> > ValueError: incomplete format key I don't think the code I gave could produce that. You'll need to show a bit more of your code, including at least line 396, possibly some context. Unless one of the other members here has a working crystal ball - mine's cooling down after excessive use. ChrisA

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


Thread

Wrapping statements in Python in SPSS alankrinsky@gmail.com - 2012-12-28 08:01 -0800
  Re: Wrapping statements in Python in SPSS Chris Angelico <rosuav@gmail.com> - 2012-12-29 03:10 +1100
    Re: Wrapping statements in Python in SPSS alankrinsky@gmail.com - 2012-12-28 08:43 -0800
      Re: Wrapping statements in Python in SPSS Peter Otten <__peter__@web.de> - 2012-12-28 18:07 +0100
      Re: Wrapping statements in Python in SPSS Chris Angelico <rosuav@gmail.com> - 2012-12-29 04:12 +1100
        Re: Wrapping statements in Python in SPSS alankrinsky@gmail.com - 2012-12-28 09:33 -0800
          Re: Wrapping statements in Python in SPSS Mitya Sirenef <msirenef@lightbird.net> - 2012-12-28 12:55 -0500
          Re: Wrapping statements in Python in SPSS Mitya Sirenef <msirenef@lightbird.net> - 2012-12-28 13:05 -0500
          Re: Wrapping statements in Python in SPSS Mitya Sirenef <msirenef@lightbird.net> - 2012-12-28 13:20 -0500
        Re: Wrapping statements in Python in SPSS alankrinsky@gmail.com - 2012-12-28 09:33 -0800
    Re: Wrapping statements in Python in SPSS alankrinsky@gmail.com - 2012-12-28 08:43 -0800

csiph-web