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: 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: <4E00E3DB.9040900@stoneleaf.us> <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 To: Adam Chapman 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Wed, Jun 22, 2011 at 8:54 AM, Adam Chapman wrote: > I've added the python directories to the environment variable "path" > in my computer (http://showmedo.com/videotutorials/video? > name=3D960000&fromSeriesID=3D96), 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 > =C2=A0File "C:\Users\Adam\Desktop\JBOOST\jboost-2.2\jboost-2.2\scripts > \nfold.py", line 13 > =C2=A0 =C2=A0print 'Usage: nfold.py <--booster=3Dboosttype> <--folds=3Dnu= mber> [-- > generate | --dir=3Ddir] [--data=3Dfile --spec=3Dfile] [--rounds=3Dnumber = -- > tree=3Dtreetype]' > > ^ > 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