Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8223
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <chris@rebertia.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; 'wed,': 0.03; '2.x': 0.05; 'formatting': 0.07; 'python': 0.08; 'run.': 0.09; 'this:': 0.10; 'syntax': 0.11; 'written': 0.14; 'am,': 0.14; 'wrote:': 0.14; 'adam': 0.16; "computer's": 0.16; 'function;': 0.16; 'illegal,': 0.16; 'cc:addr:python-list': 0.17; 'keyword': 0.19; 'cheers,': 0.19; 'command': 0.19; 'header:In-Reply-To:1': 0.21; 'variable': 0.21; 'cc:2**0': 0.22; 'cc:no real name:2**0': 0.23; 'received:209.85.213.46': 0.23; 'received:mail- yw0-f46.google.com': 0.23; 'invalid': 0.25; 'changed': 0.25; 'skip:[ 10': 0.26; 'windows': 0.26; 'script': 0.27; 'message- id:@mail.gmail.com': 0.28; 'version': 0.29; 'least': 0.30; 'cc:addr:python.org': 0.30; 'environment': 0.30; 'calling': 0.31; 'error': 0.33; "i've": 0.33; 'rather': 0.34; 'install': 0.34; 'regular': 0.34; 'chris': 0.34; 'itself,': 0.35; 'probably': 0.36; 'running': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.37; 'instead.': 0.37; 'received:209.85.213': 0.37; 'response': 0.37; 'run': 0.38; 'subject:: ': 0.38; "i'd": 0.39; 'received:209': 0.39; 'either': 0.39; 'under': 0.40; 'generate': 0.60; 'chapman': 0.84; 'sender:addr:chris': 0.84; 'hence,': 0.91; 'url:video': 0.95 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=i15fzTafKz367rCIijMEt/NXZUiF9oUexe/LNAZrYik=; b=bgWe6eljGXoLKfc478wqUg0GLXdYbzeFBaKtsVikz7SaWodPIvEM3toWIskAMibkxw b1e249GRcbvdRO5Is7M+lmysXy9U6YltA06Hao5xfSrW5qcQg/U0QL7+aqS4maCAukKU FQgdIEJMT2zLiFM9pqnbXkYnFrsWlwqUZg4eQ= |
| DomainKey-Signature | a=rsa-sha1; c=nofws; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=RTPBtb6HV6/y3soLZLHJyj+14x8WwpBur4mpPdGeDpSN3zngYzRpswWRaEszbwFVze fZDYmBqGhlqRh4QoIY/rSJMPoZtWmjj1LhK2kqpWKy/cKFPsKKBhY5boCIJwoi/QRo7Q IIfitPbp9yTYTxOrke8lU0RKLVllFbUY2ODHg= |
| MIME-Version | 1.0 |
| Sender | chris@rebertia.com |
| In-Reply-To | <2d53da9c-0a28-4f88-b786-f18a3d0f4f11@f2g2000yqh.googlegroups.com> |
| References | <e7c49eba-987f-4192-bfb6-afe0b0eddfbd@l6g2000vbn.googlegroups.com> <4E00E3DB.9040900@stoneleaf.us> <SNT109-W44DCBD6223E4A2C5492ECAE6510@phx.gbl> <mailman.238.1308682012.1164.python-list@python.org> <44f694fd-c075-41a3-a044-c1b05f2a1463@x38g2000pri.googlegroups.com> <2d53da9c-0a28-4f88-b786-f18a3d0f4f11@f2g2000yqh.googlegroups.com> |
| Date | Wed, 22 Jun 2011 09:13:48 -0700 |
| X-Google-Sender-Auth | 8TOZt3P0AQ7wJuzDIkPwp5S4NPA |
| Subject | Re: running an existing script |
| From | Chris Rebert <clp2@rebertia.com> |
| To | Adam Chapman <adamchapman1985@hotmail.co.uk> |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| 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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.288.1308759230.1164.python-list@python.org> (permalink) |
| Lines | 39 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1308759230 news.xs4all.nl 49047 [::ffff:82.94.164.166]:43557 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:8223 |
Show key headers only | View raw
On Wed, Jun 22, 2011 at 8:54 AM, Adam Chapman <adamchapman1985@hotmail.co.uk> wrote: <snip> > I've added the python directories to the environment variable "path" > in my computer (http://showmedo.com/videotutorials/video? > name=960000&fromSeriesID=96), which means I can now call python from > the windows DOS-style command prompt. > > My formatting must be wrong when calling the nfold.py script to run. No, it's a syntax error in the script itself, at least under the version of Python you're using. > My connad prompt call and the computer's response look like this: > > C:\Users\Adam\Desktop\JBOOST\jboost-2.2\jboost-2.2\scripts>nfold.py > nfold.py > File "C:\Users\Adam\Desktop\JBOOST\jboost-2.2\jboost-2.2\scripts > \nfold.py", line 13 > print 'Usage: nfold.py <--booster=boosttype> <--folds=number> [-- > generate | --dir=dir] [--data=file --spec=file] [--rounds=number -- > tree=treetype]' > > ^ > SyntaxError: invalid syntax You're probably running Python 3.x, which changed `print` from a keyword to just a regular function; hence, `print foo` is illegal, and one must write `print(foo)` instead. Based on this, I'd say that nfold.py was written for Python 2.x rather than Python 3.x; so you'll either need to port it to Python 3.x, or install Python 2.x and run it under that. Cheers, Chris -- http://rebertia.com
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-21 10:45 -0700
Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-21 11:32 -0700
Re: running an existing script Benjamin Kaplan <benjamin.kaplan@case.edu> - 2011-06-21 11:25 -0700
Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-21 12:00 -0700
Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-21 13:12 -0700
Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-22 08:54 -0700
Re: running an existing script Chris Rebert <clp2@rebertia.com> - 2011-06-22 09:13 -0700
Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-22 09:35 -0700
Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-22 09:15 -0700
Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-22 09:51 -0700
Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-22 09:51 -0700
Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-22 10:13 -0700
Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-22 10:46 -0700
Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-22 10:54 -0700
Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-22 11:50 -0700
csiph-web