14,951 Topics

Member Avatar for
Member Avatar for lfmconsummates
Member Avatar for minimee120

Hi all I need help with the final part of my practice problems for class, if anyone who can show me what to do it would be greatly appreciated!! Write a program that incorporates the following functionality: 1) Prompt the user for a series of names and scores. 2) Store …

Member Avatar for Lardmeister
0
254
Member Avatar for lisa92222

Hello, can you pls correct my answer to this question for the Python CGI part because Im really not sure if im doing it right. Thanks a lot! ![116](/attachments/large/3/116.JPG "116") ![28](/attachments/large/3/28.JPG "28") Python CGI part ---------------- #!/bin/python import cgi,string def generate_page(): print "<HTML>\n" print "\t<TITLE>Welcome</TITLE>\n" print "</HEAD>\n" print "<BODY BGCOLOR …

0
57
Member Avatar for learned1

I am making a game as a programmer that has only worked with python for about 2 months, and I need a way to save data. I know about pickle, but the Documentation does not help at all. Please note that I am using 3.1.1, so don't give me answers …

Member Avatar for hughesadam_87
0
175
Member Avatar for vmars

I'll try to start over again: Windows7, Python3.2.. When I click on a *.py file it starts up the python.exe interpreter in interactive mode. What I want it to do, is to RUN the *.py file. Please, how can I accomplish this. A *.py file is associated with python.exe . …

Member Avatar for vmars
0
2K
Member Avatar for vmars

Greetings, I installed python3 on win7, and I would like to run the turtleDemo.py . But can't seem to get it going. Can anyone help? Thanks...vm

Member Avatar for vmars
0
2K
Member Avatar for kalookakoo

[CODE]def scoreScreen(): #Keeps Calling score = 999999/canvas.data.timer canvas.create_rectangle(0,0,1000,460, fill = "black") canvas.create_text(500,200, text = "Your Score was", font = ("Comic Sans MS Bold", 20, "bold"), fill = "Red") canvas.create_text(670,200, text = str(score), font = ("Comic Sans MS Bold", 20, "bold"), fill = "Red") canvas.create_text(500,400, text = "You have beat the …

Member Avatar for jemnbuckeye
0
4K
Member Avatar for kur3k

Hi, sorry but my english is not excellent. I create app on QSystemTrayIcon, i want get all event ( mouse, key ). How? My code under, but how connect to this event? def keyPressEvent(self, event): result = QtGui.QSystemTrayIcon.keyPressEvent(self, event) return result def mousePressEvent(self, event): result = QtGui.QSystemTrayIcon.mousePressEvent(self, event) return result

0
66
Member Avatar for Twin802

I would like this code to be changed so that whenever I change the line the line will still be a wall... slin1_1 = 320 slin1_2 = 0 elin1_1 = 320 elin1_2 = 200 strtlin1 = (slin1_1, slin1_2) endlin1 = (elin1_1, elin1_2) lin1sz = 1 #creates first line above ^ …

Member Avatar for Twin802
0
227
Member Avatar for fishsticks1907

def bubble_sort(a): for i in range(0, len(a)): for j in range(0, len(a) - 1): if(a[i] < a[j]): a[i], a[j] = a[j], a[i] #can someone explain this part of the code for me #i tried doing (im more of a c++ programmer): temp = 0 temp = a[i] a[i] = a[j] …

Member Avatar for TrustyTony
0
246
Member Avatar for SpiritualMadMan

The documentation for the textEdited signal shows the use of a required parameter const QString& void textEdited (const QString&) I am unable to get the Signal to work. Perhaps because I do not understand how to use the "const QString&" Is this a literal copy into the parameter or is …

Member Avatar for Lardmeister
0
409
Member Avatar for margreet

HI there, I am a total newbee and looking for someone who has time to give me some extra python lessons. For my pre-master I need to wrap up this course. There is a small amount of compensation available. I live in Amsterdam (NL). Please let me know on short …

Member Avatar for woooee
0
149
Member Avatar for Twin802

**I would like the player after he/her makes it to the end of the map to go to the next level. Here is an example of a code that I would like you to change so the player will close and open another level... blah = unimportant coding and whatever …

Member Avatar for Twin802
0
102
Member Avatar for jdm3

zipc = "47408" url = "http://watchdog.net/us/?zip=" conn = u.urlopen(url+zipc) content = conn.readlines() for line in content: line = line.decode("utf-8") So I am working on a CGI/Python project that requires input of a zipcode to then find the name of a certain politician. Right now I am trying to find a …

Member Avatar for jdm3
0
213
Member Avatar for moroccanplaya

can anyone tell me how should i go about hiding messages in whitespaces in the end of a text for example | = whitespace hell my name is bob|| i work at home ||||

Member Avatar for ZZucker
0
197
Member Avatar for sinnebril

Hi there! I have run into a new problem, this time with the re.findall() module. The objective of this code is to iterate over rows in a Excel sheet and print them in a other Excel sheet with a separation of column between the species name and the gene name. …

Member Avatar for sinnebril
0
199
Member Avatar for xav.vijay

Hello All I am having an odd issue with mysqldb connection from python to a database. The issue is, when I run the query directly or via a sql client like navicat or toad, I get the required value, but this does not happen via python/mysqldb combo. This is the …

Member Avatar for TrustyTony
0
623
Member Avatar for treyb

I am trying to ftp on a windows system using a file with the settings in it. This is what is in the file: Address.to.device username password "quote" "site reboot" quit This will reboot a camera and it works. I even have it running on powershell script and it works. …

Member Avatar for treyb
0
323
Member Avatar for frivolous

Hi, i am trying to run this code. previously it was giving error that "No module wx". then I download wx module and now it is giving this error : Traceback (most recent call last): File "C:\Python24\player.py", line 2, in -toplevel- import wx File "C:\Python24\wx\__init__.py", line 45, in -toplevel- from …

Member Avatar for ZZucker
0
663
Member Avatar for bishisht

Hello there below is the easy way to get the email addresses extracted from any file. import os import re import sys def grab_email(file): """Try and grab all emails addresses found within a given file.""" email_pattern = re.compile(r'\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b',re.IGNORECASE) found = set() if os.path.isfile(file): for line in open(file, 'r'): found.update(email_pattern.findall(line)) for …

Member Avatar for TrustyTony
1
301
Member Avatar for TrustyTony

New Daniweb way to copy the code from posts with indentation is to double click (not too quickly) to select the code region and use normal copy paste as you like (second mouse button or ctrl-c). Easier than before but little not obvious!

Member Avatar for TrustyTony
1
293
Member Avatar for djbuclkle

Hey guys, can't see what is wrong with my code, I keep getting the error Status: 500 Internal Server Error Content-Type: text/html <html><body><h1>500 Internal Server Error</h1></body></html> [CODE]import httplib import sys import time #Initial connection to the server def connectingToServer(port, message, path): connection = httplib.HTTPConnection('rpc248.cs.man.ac.uk', port) headers = {'Content-type': 'application/xml', 'Accept': …

Member Avatar for bishisht
0
301
Member Avatar for frivolous

Given below is the error which I am getting while running the code (which is in my previous post http://www.daniweb.com/software-development/python/threads/419674/import-wx-error ) in python 2.6. Can anyone tell about this error? .. i am unable to understand it. Traceback (most recent call last): File "C:\Python26\music_player_v1\player_skeleton.py", line 153, in <module> frame = …

Member Avatar for bishisht
0
242
Member Avatar for ganeshrnet

Friends, kindly help me how to update the progress bar in WX Widgets python while copying folder in windows... i tried searching a lot.. please do help me out.. Thanks in advance! Ganesh R

Member Avatar for bishisht
0
887
Member Avatar for dvirdc

Hey. I'm writing a script that processes some data. The script creates a HTML page which contains a form that calls (action=) the same script and changes according to data asked. So the user asks for something, the script goes to a DB, gets it and prints it into the …

Member Avatar for dvirdc
0
123
Member Avatar for BThomps

I'm a tutor that is helping one of my students with a simple guessing game program. It's supposed to be similar to the board game Mastermind. This program should prompt the user to enter 5 distinct digits, and it should return the how many digits are correct and how many …

Member Avatar for BThomps
0
232
Member Avatar for salina786

I am also working in python 2.6 and i want to send SMS to a mobile while my cell phone i.e. Nokia E-72 is connected to PC via Data Cable. The mobile is connected through a serial port and the code prompts the correct port as well and there is …

Member Avatar for salina786
0
292
Member Avatar for vlady

Hello! I try to get py output to html table tag. I have a problem to create table in a table... Here is a pattern how it should look like (in yellow color) file name: format_DOC.doc here is the code I use to get a result. Pls can you help …

0
67
Member Avatar for lordluke_80

hi everyone. i'm tryng to use Reportlab to output an invoice on a simple Django app. it seems quite difficult to do simple things like this. here's my code: def print_pdf(fattura, soggetto, buffer=None): import time from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT, TA_JUSTIFY from reportlab.lib.pagesizes import letter from reportlab.platypus import SimpleDocTemplate, …

0
239
Member Avatar for Tyler212
Member Avatar for jlm699
0
75

The End.