15,181 Topics

Member Avatar for
Member Avatar for jtaylor-bye

Hi all. I am a newcomer to python and I am teaching myself from books, videos and on-line tutorials. I currently have a basic script I am working on (can't post the code right now as I'm away from my laptop), and I cannot figure out how to do what …

Member Avatar for jtaylor-bye
0
99
Member Avatar for ckugblenu

We have learnt programming concepts with python and have now acquired the skill. What are the stuff we can go in and what areas are awesome to be in. Need help

Member Avatar for m1raEbrah1m
0
120
Member Avatar for jdm3

Hello, I'm currently working on a Python CGi program. This program takes a zipcode in a form and interacts with a website to obtain information on the Congress representative for that district. My question is, certain zipcodes have multiple representatives, and I want to make a page with radio buttons …

0
84
Member Avatar for memomk

hey i have this code when starting the Process to make database it freeze at all what should i do? # -*- coding: utf-8 -*- from PyQt4 import QtCore, QtGui import sys try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName(_fromUtf8("Dialog")) Dialog.resize(400, …

Member Avatar for memomk
0
2K
Member Avatar for imperialguy

Platforms: Windows 7/Mac OS X ActiveState Python 2.7.2 Installed docx on Windows 7 at D:\Program Files (x86)\Python27\Lib\site-packages. Installed docx on OS X at /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages Following is the sample script (named as docx_example.py), which runs absolutely fine on the python interpreter: #!/usr/bin/env python ''' This file makes an docx (Office 2007) …

Member Avatar for memomk
0
625
Member Avatar for strongguy12345

Hello to all, haven't been on here in a while but recently been having major problems with trying to finish this second problem set my teacher has given me and the other students for the gr. 12 ics college coarse, currently im gr. 11 but this coarse had to be …

Member Avatar for strongguy12345
0
326
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
257
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
67
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
247
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
411
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
214
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
201
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
201
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
324
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
678
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
302
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
296
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
316
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
243
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
888

The End.