15,149 Topics

Member Avatar for
Member Avatar for -=disAbled=-

I'm trying to finish up my first Python program. The program was built to help me maintain and add content to my webpage (it's nothing fancy...just pure html). Everything was smooth sailing (hey, python kicks some serious butt), until I ran into problems using retrbinary() to download files. The problem …

Member Avatar for -=disAbled=-
0
464
Member Avatar for shanenin

I just finished my first program, other then a few test ones. it is tic-tac-toe. If you want to try it. here is the link [url]http://webpages.charter.net/lindbergfamily/game.py[/url] It is not very advanced, just mainly a bunch of if then and while statments. If any of you care to comment on my …

Member Avatar for vegaseat
0
1K
Member Avatar for stupidenator

Hey all, I am very new to python, but I hear that it can be used to handle web forms. Does anybody know of where I can find a good tutorial on how to create something that will handle form input? Thanks in advance. -Nick

Member Avatar for nephish
0
327
Member Avatar for nephish

i have an html form with a drop-down list that lists a bunch of images. how can i get my cgi script to load the image ? i have imported cgi and os text entered from a form and read from a file do ok, but i cant seem to …

Member Avatar for nephish
0
236
Member Avatar for nephish

hey there, i have written a script that gets my email messages, but i need to be able to strip off all of the stuff except the body of the message so i can write that to a text file. is there an easy way to do this ? Edit/Delete …

Member Avatar for nephish
0
212
Member Avatar for shanenin

I do not understand why the instructions are being printed off of the margin(about 5 spaces). I would think they would be directly on the margin. I am talking about this part in particular [quote] you first need to choose to go first or second. If you choose to go …

Member Avatar for vegaseat
0
175
Member Avatar for shanenin

I am getting really tired, so I am probably doing something dumb(disclaimer). below is a python function I am trying to test [php] # answer.py # # this function asks for a move and checks to see # if it is a legal place to choose. position = ['X','O',' ',' …

Member Avatar for shanenin
0
227
Member Avatar for iacobus

Hello, Now that I have been instructed as to how to write unicode characters in Python, I would like to know if it is possible to get the unicode characters into a list, dictionary, etc. Here is my very simple code: [code]a = u'\u05e9\u05dc\u05d5\u05dd!' print a print print mylist = …

Member Avatar for iacobus
0
343
Member Avatar for iacobus

Hi all, I am trying to learn unicode relative to Python, but to be honest, I'm floundering a whole lot. I have never had so much trouble with anything before, but to put it simply, I just don't get it. For example, I want to use Hebrew words in my …

Member Avatar for iacobus
0
193
Member Avatar for shanenin

from my understanding, a list can do everything a tuple can do plus more. The big advantage of using a list is you can change elements, lists are mutable. Are their situations where a tuple is preferable to a list?

Member Avatar for vegaseat
0
175
Member Avatar for shanenin

I am trying to follow this code I am reading in a book. First I will show you the code as the book has it. This is for a word jumble program. This algorythm I am refering to jumbles a word [php] import random # create a sequence of words …

Member Avatar for shanenin
0
197
Member Avatar for stupidenator

Hi everyone. This is my first post in the python thread and I am very new to the language. A while ago, i wrote a program that find the least common denominator for an array of numbers in Java. I recently started to look at the python language and I …

Member Avatar for stupidenator
0
223
Member Avatar for nephish

Hey there, i have a python cgi script that prints out html just fine in the Opera browser but doesnt print at all under FireFox. weird, eh? i am getting nothing in the apache logs about any error. perhaps its a firefox issue, but i doubt it. any suggestions. simple …

Member Avatar for nephish
0
157
Member Avatar for shanenin

here below is my code [code] #!/usr/bin/python #this is my third python script print \ """ this is a python program to figure out total sales price, including tax\n\n \t\t\tprogrammed by\n \t\t\tShane Lindberg\n\n """ base_price=int(raw_input("please enter the base price of the car:\n$")) under_coat=int(1000) stereo=int(200) air=int(750) tax=int(base_price*.07) print "the total price …

Member Avatar for shanenin
0
190
Member Avatar for nephish

Hey there. Here is the deal.... i have a script that is supposed to open a file based on criteria from a web form. i cant seem to get it to work though. here is the code: [CODE]form = cgi.FieldStorage() DataRecord = form['DataTime'].value Customer = form['CustName'].value # should be automatically …

Member Avatar for nephish
0
167
Member Avatar for reezin14
Member Avatar for vegaseat
0
304
Member Avatar for G-Do

Hi, I am a Java programmer dabbling in Python for the first time. Mostly, the transition has been pretty smooth, but this week something stumped me. Please forgive me if the answer to this is completely obvious - I've read van Rossum's tutorial and can't figure it out. I am …

Member Avatar for G-Do
0
223
Member Avatar for ruwach

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 …

Member Avatar for ruwach
0
202
Member Avatar for Lunaticrr

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 : …

Member Avatar for Lunaticrr
0
336
Member Avatar for ruwach

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> …

Member Avatar for ruwach
0
236
Member Avatar for koolhead17

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 for vegaseat
0
154
Member Avatar for missdiva
Member Avatar for warriorwarren

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>'] ] …

Member Avatar for vegaseat
0
336
Member Avatar for mneaker

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 …

Member Avatar for mneaker
0
652
Member Avatar for shak187

hi there i have some python coding which i need to convert to java can ne1 help me please email me back if you can help then i will show you the coding much apprieciated or can ne1 give me some complted java code to look at

Member Avatar for shak187
0
1K
Member Avatar for mneaker

I have a program do for a class and I cannot figure it out. I have read the tutorials but I just do not understand what I am doing. Basically I need to have the program read an input file and then take that information and be able to print …

Member Avatar for alc6379
0
113
Member Avatar for s-sriram

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) …

Member Avatar for s-sriram
0
329
Member Avatar for Sphyenx
Member Avatar for vegaseat
0
243
Member Avatar for phneoix

hi, i am thinking of designing a customised GUI frontend for mysql. i would like to know which of the programming languages Perl or Python can be used. my preference would ease of use and cross platform compatibility. i have already used off the shelf GUI's for mysql and i …

0
100

The End.