Re: [Tutor] Python Django Query

2019-04-02 Thread nitin chandra
Thanks Cameron, Just got lucky yesterday and found a resource at my end to help me out. Thank you On Tue, 2 Apr 2019 at 04:31, Cameron Simpson wrote: > > On 29Mar2019 21:18, nitin chandra wrote: > >Hi Everyone, > >I need some guidance / corrections to my code. > >

[Tutor] Python Django Query

2019-03-29 Thread nitin chandra
main page with multiple links to other pages. Use jQuery plugins, click the link on main page and open other pages. The following path and pages are posted below. Thanks Nitin Chandra ERROR When I click on 'Table' link on '

Re: [Tutor] python cgi single double quotes

2016-07-20 Thread nitin chandra
Me a little embarrassed :P ... but now when I retyped the code ... it seems to be working Alan, Peter .. .Thank you. On 20 July 2016 at 17:24, Peter Otten <__pete...@web.de> wrote: > nitin chandra wrote: > >> Ran both the method > > So everything seems to be worki

Re: [Tutor] python cgi single double quotes

2016-07-20 Thread nitin chandra
Word - First CGI Program Hello Word! This is my first CGI program 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] First name: On 20 July 2016 at 15:15, Peter Otten <__pete...@web.de> wrote: > nitin chandra wrote: > >> On inserting the line ... >> >> print "

Re: [Tutor] python cgi single double quotes

2016-07-20 Thread nitin chandra
nt 'First name: ' print '' print '' --- Hello Word! This is my first CGI program 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] First name: On 20 July 2016 at 14:14, Alan Gauld via Tutor wrote: > On 20/07/16 09:

Re: [Tutor] python cgi single double quotes

2016-07-20 Thread nitin chandra
(default, Jun 22 2015, 17:58:13) [GCC 4.8.2] >>> Should I test the above from within html code too ? Also, for testing and configuration purpose, I have set 755 / 777 permissions to dir / files respectively. Thank you, Nitin Chandra On 20 July 2016 at 00:46, Alan Gauld via Tutor wro

[Tutor] python cgi single double quotes

2016-07-19 Thread nitin chandra
Hi I wrote python+cgi script on hostgator server and I could embed html like:- code folder :- /home/userName/public_html/*.cgi #!/usr/bin/env python print "Content-Type:text/html\n\n" print print """ ... ... """ The above style / way of coding works. Even on my laptop where the code is i

[Tutor] Python WATable & DB

2016-07-11 Thread nitin chandra
Hi All, Any body got experience in WATable + passing data from DB to JS / json ... and if it is stretching it a bit .. has done it with python. Also, how do I pass link of employee images/photos. I just posted the part of JS , which I believe is concerned with data to be displayed in the table.

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 2

[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)) DataErro

Re: [Tutor] postgreSQL + psycopg2

2016-05-10 Thread nitin chandra
excuse :P On 11 May 2016 at 03:57, Alan Gauld via Tutor wrote: > On 10/05/16 08:33, nitin chandra wrote: > >> here is the result. >> >> 1 >> ('Supervisor',) >> >> 1 >> Vinayak >> Salunke >> 1 >> >> Now I ne

Re: [Tutor] postgreSQL + psycopg2

2016-05-10 Thread nitin chandra
IT WORKED THANK YOU SSS MUCH ...phew .. Thank you here is the result. 1 ('Supervisor',) 1 Vinayak Salunke 1 Now I need to remove the braces and quotes .. :) Thank you Nitin On 10 May 2016 at 12:30, Peter Otten <__pete...@web.de> wrote: > nitin chandra wrot

Re: [Tutor] postgreSQL + psycopg2

2016-05-09 Thread nitin chandra
uot;, >>> password="") >>> cursor1 = conn.cursor() >>> query=("""SELECT designation_name FROM designation WHERE designation_id = >>> %s;""") >>> nextrow = (query, (design1)) >>> nextrow ('SELECT designat

[Tutor] postgreSQL + psycopg2

2016-05-09 Thread nitin chandra
Hi All, I am trying to pass a variable to the following statement : for line1 in smallLIST1: design1 = line1[3] print design1 nextRow=cursor1.execute("SELECT designation_name FROM designation WHERE designation_id = %s;", (design1)) print nextRow print "" for row in lin

Re: [Tutor] python smtplib 'Message denied - From address spoofing attempt detected via SMTP

2016-03-26 Thread nitin chandra
1490 P=esmtpa A=dovecot_plain:no-re...@jsshs.org S=692 for mailhostingser...@gmail.com ni...@chandrainformatics.com 2016-03-26 04:22:38 1ajfkE-000jLZ-Js => blackhole (DATA ACL discarded recipients): Message denied - From address spoofing attempt detected via SMTP ( From address: IP: 111.118.215.222 Authe

Re: [Tutor] python smtplib 'Message denied - From address spoofing attempt detected via SMTP

2016-03-25 Thread nitin chandra
Admin from service provider, From header needs to be looked into. Haven't found any solution, mostly all suggested scripts are similar. On 26 March 2016 at 00:24, Joel Goldstick wrote: > > > On Fri, Mar 25, 2016 at 2:34 PM, nitin chandra > wrote: >> >> Hi All, >>

[Tutor] python smtplib 'Message denied - From address spoofing attempt detected via SMTP

2016-03-25 Thread nitin chandra
Hi All, I am trying to script a confirmation mail on submission of a form. Till now the form submission and summery page is working. BUT the following 'section' is not working. -- This is a python(CGI) script -- hosted on a shared server on hostgator.in -- This is giving "250 Spoofing error ...

Re: [Tutor] Calendar

2011-09-12 Thread nitin chandra
I tried it in the following way, but beyond that i am not able to go. #!/usr/bin/env python import os, re, sys, calendar from datetime import datetime myCal = calendar.monthcalendar(2011,9) html += str(myCal) mycal = myCal[:1] cal1 = myCal[1:2] cal2 = myCal[2:3] cal3 = my

[Tutor] Calendar

2011-09-12 Thread nitin chandra
Hi All, I need to create a calendar with python & CSS for the web page, in the following format Dec , 2011 - sun | mon | tue | wed thu fri sat sun mon tue wed thu f

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread nitin chandra
Thank you. Nitin On Mon, Jun 20, 2011 at 5:17 AM, Steven D'Aprano wrote: > nitin chandra wrote: >> >> Hello All, >> >> MY Sincerest APOLOGIES i had joined a a mail box management >> services... >> But unfortunately It started interfering with m

[Tutor] SORRY - nitinchandra rubbish on list

2011-06-19 Thread nitin chandra
On Sun, Jun 19, 2011 at 11:52 PM, nitin chandra wrote: > Hello All, > > MY Sincerest APOLOGIES i had joined a a mail box management services... > But unfortunately It started interfering with my Gmail mail box. > > But i was completely unaware that It was also effecting

[Tutor] nitinchandra rubbish on list

2011-06-19 Thread nitin chandra
others on the list. I have now ... as of this moment / mail ...rectified the issue. Please do let me know if it still persists. IT Should not ...though. Sorry once again the list. Reg Nitin Chandra ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] lxml.html

2011-06-09 Thread nitin chandra
Sorry, did not realise , on clicking "Reply", I was mailing only to you. Thank you for pointing that out. Duly complied. TypeError: cannot concatenate 'str' and 'NoneType' objects >> I am extracting form field name / value from an html, but then it gives the above error and do

[Tutor] lxml.html

2011-06-08 Thread nitin chandra
Hello Every One, doc = lxml.html.parse('/home/dev/wsgi-scripts/index.py').getroot() name = doc.forms[0].fields['name'] html = 'name is ' html += name ERROR [Wed Jun 08 20:29:51 2011] [error] [client 192.168.1.9] Traceback (most recent call last): [Wed Jun 08 2

Re: [Tutor] merging 2 files.

2011-02-24 Thread nitin chandra
On Thu, Feb 24, 2011 at 9:18 PM, nitin chandra wrote: > Hi Martin, > > Thanks a lot. It did work, but I am trying to break it down and  understand > >>  import csv >> >>  # -- build the lookup table >>  # >>  lookup = dict() >>  file0 = csv.r

[Tutor] merging 2 files.

2011-02-24 Thread nitin chandra
Hello Every One, I have A problem :) I have a file with data collected in with 5 colums in a CSV format. eg. test.csv (below) format --- 26290,75.318669993,28.390548328,"WELL 3","WELL 3 MENCHOKE FUNCTIOANL" 26290,75.316180604,28.3970

Re: [Tutor] Need URGENT support ... PL

2010-08-25 Thread nitin chandra
-0.147851 -0.029492 PR1 0.015000 -0.130522 -0.186620 0.712175 0.008944 1.339193 -0.401560 PR3 0.059166 -0.010105 0.188483 0.024012 0.302548 -0.001217 On Thu, Aug 26, 2010 at 1:10 AM, nitin chandra wrote: > Hi all, > > I have been getting support on this from the list, but unfortunately >

[Tutor] Need URGENT support ... PL

2010-08-25 Thread nitin chandra
Hi all, I have been getting support on this from the list, but unfortunately now it has become URGENT that i get some solution to this problem i need to resolve. What i have done is create FileA.CSV whose structure is as follows :- (no blank spaces, this is just for representation) /home/nitin/pa

Re: [Tutor] Multiple file open

2010-08-20 Thread nitin chandra
Thank You Very Much :) Walter. It WOrked I did the "except" closing. Thanks Nitin On Sat, Aug 21, 2010 at 2:17 AM, Walter Prins wrote: > > Hello Nitin, > > On 20/08/10 16:21, nitin chandra wrote: >> >> import sys,os, fileinput >> > > [...

Re: [Tutor] Multiple file open

2010-08-20 Thread nitin chandra
2) col18 = (((float(col6)) + (float(col12))) / 2) col19 = (((float(col7)) + (float(col13))) / 2) print col1,col14,col15,col16,col17,col18,col19 str3 = '%s,%s,%s,%s,%s,%s,%s\n' % (col1,col14,col15,col16,col17,col18,col19) fp3.write(str3) On Fri, Aug 2

Re: [Tutor] Multiple file open

2010-08-20 Thread nitin chandra
quot;mer5Pr2.py", line 66 ^ IndentationError: unexpected unindent Thank you Nitin On Fri, Aug 20, 2010 at 1:28 PM, Alan Gauld wrote: > > "nitin chandra" wrote >> >> FileA = raw_input('Enter

Re: [Tutor] Multiple file open

2010-08-20 Thread nitin chandra
Hello All, I am getting the "Invalid Syntax" error. I am on Python 2.6. Thanks In Advance Nitin import sys,os, fileinput FileA = raw_input('Enter CSV file with lists of Files:') try: fp6 = open(FileA,'r') except IOError: ## I am get

Re: [Tutor] Multiple file open

2010-08-19 Thread nitin chandra
Hello All, >> Please guide with the syntax. > > All beginners tutorials on the web teach the syntax of python.. I am > unsure what your questions is. My bad with code. > >> below is the existing program with Formula A (Mean). Formula B will be >> Extrapolation, >> also I have not been abl

[Tutor] Multiple file open

2010-08-18 Thread nitin chandra
Hi All, @ Alan - Thank you. Your suggestion worked. ( read 2 input file and 1 output file). I am on Python 2.6 I need to process two sets of 96 files and prepare equal no. of sets of 96 files. The first set of 96 files have a formula A and second set of 96 files have formula B. Formula A is deri

[Tutor] reading from 2 file output to 1

2010-08-17 Thread nitin chandra
Hello All, I am trying to read from 2 CSV files, where first 4 ([0,1,2,3]) columns are read from 'file1' and 3 columns ([1,2,3]) from 'file2' and write them into a 3rd file 'file3', 7 columns string. The data is Numeric values both, +ve and -ve. this is how i was trying.

Re: [Tutor] Reading every 5th line

2010-08-08 Thread nitin chandra
Hello Dave, Thank you very much. This solution worked out very well. And I liked your style of coding ' In less DO more '. Thank You once again. Nitin PS :- I tried to use a file pointer with raw_input, but that did not work. > > This may help you get started. > > FileNames = ["FileName

[Tutor] Reading every 5th line

2010-08-08 Thread nitin chandra
Hello Everyone, I am to make a small programme for a friend of mine where i am to start reading from 14th (string) from a file and then read every 5th row. ie. in 1st read it reads the 14 row in a File, write to an OUTPUT-1 file Next reads 19th row, write to the OUTPUT-1 file then 24th row,... s

[Tutor] PyWX

2009-10-22 Thread nitin chandra
Hi I was wondering if there is any one on the list who has experience in installing PyWX with AOLserver on Linux. I am facing some issues. any support will be welcome ... either on list or off list. Thanks Nitin nitinchand...@gmail.com ___ Tutor mail

Re: [Tutor] Any one got any idea

2009-10-18 Thread nitin chandra
On Mon, Oct 19, 2009 at 1:58 AM, nitin chandra wrote: > Hello Everyone, > > i am compiling Python 2.6.2 from source and have successfully been > able to cross at least that is what i am thinking . > ./configure and make but i am facing a peculiar problem in > insta

[Tutor] Any one got any idea

2009-10-18 Thread nitin chandra
Hello Everyone, i am compiling Python 2.6.2 from source and have successfully been able to cross at least that is what i am thinking . ./configure and make but i am facing a peculiar problem in installing it this time. (This is the second time i am installing on the same system with

[Tutor] Calculating Deflection angles

2007-07-04 Thread nitin chandra
Hello Every One, I create a list of coordinates of 2 lines. X11,Y11 & X12,Y12 as starting and ending of one line. X21,Y21 & X22, Y22 as starting and ending of the 2nd line. Now is there any way to calculate the deflection angle between the two lines? Will any modules be required other than Python

Re: [Tutor] hand-holding for web development

2005-10-18 Thread nitin chandra
Thanks Jay On 10/18/05, Jay Loden <[EMAIL PROTECTED]> wrote: > You need an Apache config section to tell it what to use mod_python on and > how. For example, in httpd.conf or a separate file in your conf.d directory i guess the can be added only in one of the conf file. Which one should i add in

[Tutor] guidance for web site development

2005-10-14 Thread nitin chandra
page (file) on the browser. i need the initial hand holding/guidance of how to start, configure , and develop modules. thanks in advance. Nitin Chandra ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] hand-holding for web development

2005-10-13 Thread nitin chandra
(file) on the browser. i need the initial hand holding/guidance of how to start, configure , and develop modules.   thank in advance.   Nitin Chandra ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor