help regarding re.search
nevesagar at gmail.com
Thu Sep 15 06:58:21 CEST 2011
Yes. It is been resolved now for the sample program. however, as mentioned
in other post. It is not working in the main program
On Thu, Sep 15, 2011 at 10:25 AM, Kushal Kumaran <
kushal.kumaran+python at gmail.com> wrote:
> On Thu, Sep 15, 2011 at 10:11 AM, Sagar Neve <nevesagar at gmail.com> wrote:
> > Here is the code
> > url="
> > 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
> python3 file.py
> whatever is applicable in your environment.
> > On Thu, Sep 15, 2011 at 9:05 AM, Chris Rebert <clp2 at rebertia.com> wrote:
> >> On Wed, Sep 14, 2011 at 8:33 PM, Sagar Neve <nevesagar at gmail.com>
> >> > 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list