Member Avatar

Hey there, i am trying to write an online application using the cgi module. what i want to do is have an html form display a drop-down list and have the values of that list be the lines of text written in a file. this would be updated almost every time the site is visited. i have been sucessful in writing text to a file from an html form. but i need to access this so it can be selected. is there a way to do this? i have found limited info on how to really use the cgi module. …

Member Avatar
0
3
Member Avatar

I am new to pragramming and also Python. I was reading the intro and basics for beginners in the sticky of this forum and tired it out. It was cool and all but after saving the files, I click F5 to run it and i get the error message : Syntax Error There's and error in your program: invalid syntax then in highlights in orange the number "4" of 2.4.1 in the top of the IDLE thingy that shows the version "Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" …

Member Avatar
0
9
Member Avatar

Hey there, i need some help with a simple cgi script. i cannot get it to write output to a file. here is the script. [CODE] #!/usr/bin/python import cgi form = cgi.FieldStorage() Customer = form['Customer'].value Field = form['Field'].value data = [Customer, Field] reshtml = """Content-Type: text/html\n <html> <head><title>Customer Data</title></head> <body> <h1>Customer Data</h1> <p>Here ya go</p> </body> </html>""" print reshtml + 'Customer =' + data[0] print ' ' + ' Field = ' + data[1] # this is where the script fails to do anything.... OutFile = open("/home/nephish/Test.txt", "w") OutFile.write("Here is a spot of text to input") OutFile.close [/CODE] it works, …

Member Avatar
0
4
Member Avatar

HEY EVERYONE THERE I WUD LIKE U TO TELL THT FUTURE IS "python" everythin is "python" atleast 4 those who hates writin in creepin c,c++ programmin languare which is error prone

Member Avatar
0
5
Member Avatar

what program is this ?

Member Avatar
0
3
Member Avatar

Hi, I have the following interface for a 35 day month calander script that I am writing. The interface is called for use with an html page. I am supposed to collect user input which includes day, month and their event. blankEventsJan = [ ['<br>','<br>','<br>','<br>','<br>','<br>','<br>'], ['<br>','<br>','<br>','<br>','<br>','<br>','<br>'], ['<br>','<br>','<br>','<br>','<br>','<br>','<br>'], ['<br>','<br>','<br>','<br>','<br>','<br>','<br>'], ['<br>','<br>','<br>','<br>','<br>','<br>','<br>'] ] I have already collected user input to tell me what day, month and event is required. Now I need a way to insert the user info into the correct month and return the month in the same interface forum as above. I have tried to create a new file which …

Member Avatar
0
15
Member Avatar

I have a program due and I cannot figure it out! I have read about 30 tutorials to no avail! I need to have data read into python from an input file. The data is suppossed to be info from a pretend university that only has 10 students. Once I figure out how to input the data I should be able to do the rest but right now I am stumped!

Member Avatar
0
19
Member Avatar

Hi I am trying my first try at Python. I want to do something very similar to what sprintf does with C. I want to concatenate a string with a number and store it into a new string. I wrote a snippet like this username='user' for i in range (1-100) user=user_name+str(i) print user else: print 'The loop is done' But this one fails to do the same. Can somene help me decipher where exactly I am going wrong. Thanks for your help regards Ram

Member Avatar
0
13
Member Avatar

some one recomended i learned python too, wwhat it is??

Member Avatar
0
5

The End.