PROBLEMS WITH PYTHON IN SOME VARIABLE,FUNCTIONS,ETC.
Vladimir Kropylev
zzvladimir at gmail.com
Tue Apr 8 05:02:00 EDT 2008
yes, ths is known problem. I can just recomend you to use Linux or
FreeBSD, though cygwin maybe also possible
2008/4/8, subhabrata.iisc at hotmail.com <subhabrata.iisc at hotmail.com>:
> I am using Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.
> 1310 32 bit (Intel)] on win32 with IDLE 1.2.1
> My O/S is Windows XP SP2 I use 512 MB RAM.
> I am encountering the following problems:
> (i) a1=1
> a2=2
> a3=a1+a2
> print a3
> # The result is coming sometimes as 3 sometimes as vague numbers.
>
> (ii) x1="Bangalore is called the Silicon Valley of India"
> x2="NewYork"
> x3=x1.find(x2)
> print x3
> # The result of x3 is coming as -1 as well as +ve numbers.
>
> (iii) I have been designing one crawler using "urllib". For crawling
> one web page it is perfect. But when I am giving around 100 URLs by
> and their links and sublinks the IDLE is not responding. Presently I
> have been running with 10 URLs but can't it be ported?
>
> (iv) I have designed a program with more than 500 if elif else but
> sometimes it is running fine sometimes it is giving hugely erroneous
> results, one view of the code:
> elif a4==3:
> print "YOU HAVE NOW ENTERED THREE WORDS"
> if a3[0] not in a6:
> if a3[1] not in a6:
> if a3[2] not in a6:
> print "a3[0] not in a6, a3[1] not in a6, a3[2] not
> in a6"
> elif a3[2] in a6:
> print "a3[0] not in a6, a3[1] not in a6, a3[2] in
> a6"
> else:
> print "NONE3.1"
> elif a3[1] in a6:
> if a3[2] not in a6:
> print "a3[0] not in a6, a3[1] in a6, a3[2] not in
> a6"
> elif a3[2] in a6:
> print "a3[0] not in a6,a3[1] in a6, a3[2] in a6"
> else:
> print "NONE3.2"
> else:
> print "NONE3.3"
> elif a3[0] in a6:
> if a3[1] not in a6:
> if a3[2] not in a6:
> print "a3[0] in a6, a3[1] not in a6, a3[2] not in
> a6"
> elif a3[2] in a6:
> print "a3[0] in a6, a3[1] not in a6, a3[2] in a6"
> else:
> print "NONE3.4"
> elif a3[1] in a6:
> if a3[2] not in a6:
> print "a3[0] in a6, a3[1] in a6, a3[2] not in a6"
> elif a3[2] in a6:
> print "a3[0] in a6, a3[1] in a6, a3[2] in a6"
> else:
> print "NONE3.5"
> else:
> print "NONE3.6"
> else:
> print "NONE3.7"
> Why it is behaving like that?
> If someone can help me.
> Best Regards,
> Subhabrata Banerjee,
> Indian Institute of Science,
> Bangalore,
> India.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list