Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #13300
| References | <CAP8kui=Nqo6bDQh-SA-t+KMFs=NrgYYFmnsw6wXATJ8-aTxmZQ@mail.gmail.com> <CAMZYqRR5UqHhdKiyLsZqE8DouXDWvFOsUw8OCYfjZ0E9f8iEBg@mail.gmail.com> <CAP8kuinJnPv=6U1J6LYZgGk_yUN6PskvHStCo1kEMHUBG1NkuQ@mail.gmail.com> <CAMZYqRSiHY3Cz=r=oAioNCUUEz=L1fW4ngLc4xCyPwwpU9mM2A@mail.gmail.com> <CAP8kuik0Aq0gc5NvYPU__k96QiSc0uj+nbAezsx685TGzb2o3w@mail.gmail.com> |
|---|---|
| From | Kushal Kumaran <kushal.kumaran+python@gmail.com> |
| Date | 2011-09-15 10:25 +0530 |
| Subject | Re: help regarding re.search |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1146.1316062543.27778.python-list@python.org> (permalink) |
On Thu, Sep 15, 2011 at 10:11 AM, Sagar Neve <nevesagar@gmail.com> wrote: > Here is the code > > > url="http://xy.yz.com/us/r1000/012/Purple/b1/c6/e2/mzm.dxkjsfbl..d2.dpkg.ipa" > > Man_Param="/us/r1000" > Opt_Param1="Purple" > Opt_Param2="dpkg.ipa" > > if (Opt_Param2 in url): > print "hello." > else: > print "bye." > > It gives me: > > ./sample.py: line 9: syntax error near unexpected token `:' > ./sample.py: line 9: `if (Opt_Param2 in url): ' > > 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 <clp2@rebertia.com> wrote: >> >> On Wed, Sep 14, 2011 at 8:33 PM, Sagar Neve <nevesagar@gmail.com> 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. >> -- regards, kushal
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: help regarding re.search Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2011-09-15 10:25 +0530
csiph-web