Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'else:': 0.03; 'interpreter': 0.07; 'snippet': 0.07; 'unexpected': 0.07; 'python': 0.08; 'bash': 0.09; 'am,': 0.12; 'trace.': 0.16; 'url=""': 0.16; 'cc:addr:python-list': 0.16; 'syntax': 0.16; 'this:': 0.16; 'wrote:': 0.16; 'wed,': 0.17; 'working.': 0.18; 'received:74.125.82.174': 0.19; 'received:mail- wy0-f174.google.com': 0.19; 'cc:no real name:2**0': 0.20; 'subject:help': 0.22; 'header:In-Reply-To:1': 0.22; 'sep': 0.23; 'pm,': 0.24; 'stack': 0.24; 'sender:addr:gmail.com': 0.25; 'code': 0.25; 'thu,': 0.28; 'looks': 0.29; 'message-id:@mail.gmail.com': 0.29; 'print': 0.29; 'cc:addr:python.org': 0.30; 'environment.': 0.30; '\xc2\xa0\xc2\xa0\xc2\xa0': 0.30; 'seem': 0.31; 'error': 0.32; 'chris': 0.32; 'does': 0.32; 'message.': 0.34; 'cc:2**1': 0.36; 'using': 0.37; 'run': 0.37; 'something': 0.37; 'received:74.125.82': 0.38; 'question,': 0.38; 'received:google.com': 0.38; 'skip:o 20': 0.38; 'subject:: ': 0.39; 'missing': 0.39; 'received:74.125': 0.39; "it's": 0.40; 'your': 0.61; 'url:us': 0.63; 'here': 0.65; 'here.': 0.66; 'show': 0.67; 'applicable': 0.68; 'me:': 0.84; 'url:d2': 0.84; 'url:r1000': 0.84; '10:11': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=nIqoRiAb7RCmDAId/HYdK9Q/VhlAEe4QLB0pw7duWcI=; b=kZ/PI3cObUWObHDaHFEr8v35FWurf1NEXtTm8IyXShwj55cec9UAXYC8QmYwXxbfwO ql7z4aO5vM5j41xFKoNQ2W4vAyXuZA6WBUkL2zJFtvXukS9Vw8fsrjbhdtGO858pDsWw dIztTsuuK0Vqz0M2Upi2LFgsKyvlTq1NB6tTw= MIME-Version: 1.0 Sender: kushal.kumaran@gmail.com In-Reply-To: References: From: Kushal Kumaran Date: Thu, 15 Sep 2011 10:25:19 +0530 X-Google-Sender-Auth: By3gQ-sDCOm2swGOF0ERB22fsYw Subject: Re: help regarding re.search To: Sagar Neve 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: 49 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1316062543 news.xs4all.nl 2475 [2001:888:2000:d::a6]:46552 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:13300 On Thu, Sep 15, 2011 at 10:11 AM, Sagar Neve wrote: > Here is the code > > > url=3D"http://xy.yz.com/us/r1000/012/Purple/b1/c6/e2/mzm.dxkjsfbl..d2.dpk= g.ipa" > > Man_Param=3D"/us/r1000" > Opt_Param1=3D"Purple" > Opt_Param2=3D"dpkg.ipa" > > if (Opt_Param2 in url): > =C2=A0=C2=A0=C2=A0 print "hello." > else: > =C2=A0=C2=A0=C2=A0 print "bye." > > It=C2=A0 gives me: > > ./sample.py: line 9: syntax error near unexpected token `:' > ./sample.py: line 9: `if (Opt_Param2 in url):=C2=A0=C2=A0=C2=A0 ' > > That looks like a bash error message. Syntax errors in python show up with a stack trace. Run your program using the python interpreter like this: python file.py OR python3 file.py whatever is applicable in your environment. > > > On Thu, Sep 15, 2011 at 9:05 AM, Chris Rebert wrote: >> >> On Wed, Sep 14, 2011 at 8:33 PM, Sagar Neve wrote: >> > If A in B: >> > does nt seem to be working. >> > Am I missing something here. >> >> Please provide a snippet of the code in question, and be specific >> about how it's not working. >> --=20 regards, kushal