[Tutor] Use of None (was: Re: Tutor Digest, Vol 147, Issue 52)

2016-06-01 Thread Alan Gauld via Tutor
On 01/06/16 12:43, marat murad via Tutor wrote: > Thanks for your replies,I think I understand it much better now. I Also I > wanted to know what the 'None' does in the second program. Please make the subject something meaningful and delete all the excess messages. we have all seen them already

Re: [Tutor] OrderedDict?

2016-06-01 Thread Alan Gauld via Tutor
On 01/06/16 16:36, Alex Hall wrote: > I'm trying to find the OrderedDict documentation. I found one page, but it > wasn't very clear on how to actually make an OrderedDict. Plus, an empty > constructor in Python's interpreter returns an error that the class doesn't > exist It's in the

Re: [Tutor] Study Tips

2016-06-01 Thread Alan Gauld via Tutor
On 01/06/16 20:06, Anindya Mookerjea wrote: > Hi experts, > > I am going to start learning Python and have got no coding > experience/knowledge whatsoever . So Python would be my first programming > language Start with one of the tutorials on the non-programmers page of python.org

Re: [Tutor] Tutor Digest, Vol 147, Issue 52

2016-06-01 Thread marat murad via Tutor
Thanks for your replies,I think I understand it much better now. I Also I wanted to know what the 'None' does in the second program. Thanks in Advance Minhaj On Wed, Jun 1, 2016 at 1:59 AM, wrote: > Send Tutor mailing list submissions to > tutor@python.org >

Re: [Tutor] Study Tips

2016-06-01 Thread Steve Lett
Gday! On 31/05/2016 8:52 AM, "Steve Lett" wrote: > Thank you for the reply. > On 30/05/2016 3:45 PM, "Steve Lett" wrote: > >> Hi folks, >> Just started learning python. I've been having a really hard time in >> getting started, and still am! I

[Tutor] OrderedDict?

2016-06-01 Thread Alex Hall
Hi list, I'm trying to find the OrderedDict documentation. I found one page, but it wasn't very clear on how to actually make an OrderedDict. Plus, an empty constructor in Python's interpreter returns an error that the class doesn't exist (Python 2.7.11). I also found the PEP, plus some home-grown

Re: [Tutor] Study Tips

2016-06-01 Thread Anindya Mookerjea
Hi experts, I am going to start learning Python and have got no coding experience/knowledge whatsoever . So Python would be my first programming language Please suggest Thank you Anindya On Wednesday, June 1, 2016, William Ray Wing wrote: > > > On May 30, 2016, at 1:45 AM,

Re: [Tutor] Study Tips

2016-06-01 Thread William Ray Wing
> On May 30, 2016, at 1:45 AM, Steve Lett wrote: > > Hi folks, > Just started learning python. I've been having a really hard time in > getting started, and still am! I have a slight learning difficulty, > including a stroke in Jan.2010. You wouldnt know even if u were

Re: [Tutor] UPDATE, pyhthon+postgre

2016-06-01 Thread nitin chandra
Thank you Stephen, Johnf, This is what I did and it worked :- todayTime2 = datetime.datetime.now() todayTime1 = timezone('Asia/Calcutta').localize(todayTime2) time_created=%s WHERE group_code = %s;""", ( .,...,..., str(todayTime1),)) Thanks for the Hint, Johnf :) Nitin On 1 June

Re: [Tutor] UPDATE, pyhthon+postgre

2016-06-01 Thread john
cursor1.execute("""UPDATE employee SET name=%s, add=%s, add1=%s, city=%s, state_county=%s, country=%s, basic=%s, WHERE group_code = %s""" % (name,add,add1,city,state_county,country,basic,grpCode)) It appears that you are not required to provide any time or date since you created a default. Of

[Tutor] UPDATE, pyhthon+postgre

2016-06-01 Thread nitin chandra
Hello All, I am writing a UPDATE statement, but am getting stuck with the following error. Traceback (most recent call last): File "/var/www/passtms/updateCutoff.cgi", line 70, in WHERE group_code = %s;""", (name,add,add1,city,state_county,country,basic,todayDT,todayTIME,grpCode))

Re: [Tutor] Python OLS help

2016-06-01 Thread Michael Selik
You're welcome. A tip for the next bug: Google is pretty good at finding a discussion of the error if you paste the whole phrase as your search terms. In this case, I searched for "ValueError for numerical factors num_columns must be an int" and found the relevant Google Group thread. PS. I

Re: [Tutor] Python OLS help

2016-06-01 Thread Michael Selik
On Tue, May 31, 2016 at 5:45 PM Vadim Katsemba wrote: > I typed in lm = smf.ols(formula='LATITUDE~DIAMETER',data=dataf).fit(), and > I ended up getting this error: ValueError: For numerical factors, > num_columns must be an int. > You may be using an old version of Patsy,