15,179 Topics
| |
I'm pretty much a complete beginner. I'm trying to get a 'timer' or 'clock' that pretty much just counts how long you have the window open by using a loop that adds 1 to "a" for every second, and adds 1 to "b" for every 60 seconds (while subtracting 60 … | |
I used someone else's code as an example to start my game and move my character around. I understood the majority of it but there's a couple of parts I don't get. I want my character to move Up when the up arrow is pressed, but smoothly! My code right … | |
Hi, I have just started python as after a chat with a friend I have discovered it would be the most suitable language for my latest project. The problem I have come across is I need a sha1 function written in python. I don't want to use the built in … | |
I am an absolute beginner to programming. I started a programming course recently. I have a task which basically involves coding a first fit algorithm. The task is to design and implement a program to pack items into containers using first fit algorithm. A container has an arbitrary capacity. The … | |
Hey forum, I've been interested in creating Python scripts to work with iTunes, and I recently learned about the win32com library, and more specifically, win32com.client. My problem is that I lack knowledge of the iTunes.Application properties and methods. I've done multiple Google searches in hopes of finding a knowledge base … | |
Is there an equivalent option to curl's -d option for pycurl? What I want to do is specify multiple parameters in the URL for instance this does not work: [CODE] USER = aurawind2k PASS = XXX STREAM_URL = "http://status.dummy.com/status.json?userId=12&page=1" class Client: def __init__(self): self.buffer = "" self.conn = pycurl.Curl() self.conn.setopt(pycurl.USERPWD, … | |
Can someone please help fix this program? I'm pretty new in Python. Every time I run this program it says : Traceback (most recent call last): File "E:/Python/delin.py", line 38, in <module> discounted_total = regular_total - full_discount TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' def find_discount(total): if total … | |
I have a home work assignment to make a photo gallery using the cImage module. It is supposed to have a forward and a backward button, and display images named picture0, picture1, picture2... so that after you click the forward button on the last picture it will go back to … | |
I'm trying to make a simple email sender used for submitting problem reports on a program I am writing. The sender doesn't need to have changeable sender and receiver address, the address the program will use for sending the email will be the same always (for this example, 'example@example.com') and … | |
Dear Friends I am facing some problems in deploying my application for lower version of qt. Basically i want to generate scripts for my application and I have chosen pythonqt for this purpose. Pythonqt has the problem with lower version of Qt (Qt 4.5.2) and also with Higher version of … | |
Hi I just started with python, and trying to implement some system admin tasks and running into some rough. Basically I need to do some task on whichever share exists on their corresponding server. eg Server A has shares 1,2 and 3 Server B has share 1 and so on. … | |
ok well I'm working on making a dungeon explorer and I can't get images to work...so far I have this[CODE] from Tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() canvas = Canvas(frame, width = 225, height = 225) canvas.pack() gif1 = PhotoImage(file = 'Fhall.gif') canvas.create_image(0, 0, … | |
hi guys n girls im making a list of the biggest files on my computer i have got most of the coding done but i have hit a brick wall with the sort function. i can sort the size or the file name but as they are both in the … | |
D is a list containing some words. D=[word1,word2,word3......] E is a list containing combinations of any two words in D ... E=[(word1,word2),(word7,word1)....] How can I implement the following in python: [CODE]A0[x]=1 for all x in D # This is actually Ai. when i=0, it becomes A0 B0[x]=1 for all x … | |
Hi! Have some problems with my code again... I have a list "playerCardList" containing six elements where you pick out three of these. The three elements you pick should be removed from the bigger list "cardList" containing 81 elements. And after that three new elements from "cardList" would be put … | |
Write parts 1 (convert string to lowercase) and 2 (tokenize string) of that code and incorporate the function below. Use the string.split function. Get the code to work as a cohesive unit to convert strings like "two hundred sixty two" to numbers like 262. This is basically what I need … | |
The program that you will be writing will be called Books.py. * Open the file for reading * Create an empty dictionary * Read line by line through the file * For each line strip the end-of-line character and remove punctuations. Replace hyphens (-) with blanks. In the function parseString() … | |
Hi! When I print the six card I would like the "player" to be able to pick three out of these cards. Does anyone know how to do this? Do I create a new list and then append the cards to that list? Very thankful for any help! Here's the … | |
Hello, I am in the middle of implementing a TFTP client using python though I have come unstuck on a client timeout feature. I am trying to implement the following feature, quote taken from the RFC: "If a packet gets lost in the network, the intended recipient will timeout and … | |
I need to make the user ask for an English sentence and then make it produce the spanish translation of it from a given data base which is given in list form. I also want the user to keep asking for a english sentence until I type in a character … | |
Hullo, I’ve been banging around all week (after re-install of Snow Leopard) trying to get python configured with MacPorts, OpenCV, and PyGame (at least). I’ve got python_select properly configured and seemingly working, but I can’t seem to get any of these modules including all at once. Currently I can include … | |
Hi can anyone tell me how to remove empty keys in the following dictionary d={'a':[],'b':['1','2'],'c':[]} I want it to be d={'b':['1','2']} I tried this. But its showing error. I know its wrong to change the size of a dictionary during iteration. But is there any other way? [CODE]>>> for x … | |
as part of a game I'm making I decided to make an importable/executable file to shorten the code and I was wondering... [CODE]def view(N,W,E,S): if info_dict["direction"] == "north": if N != 1: pic = fwall wall = "yes" if N == 1: if W != 1 and E != 1: … | |
how do i get round this error then because i have a mixed list of file names and their size i need it sorted by the size and i get errors trying to sort the size on its own because of they way it pairs the file name and the … | |
Dear Sir, I have written a script to extract the first line starting with [COLOR="Red"]Source Name[/COLOR] AND ends with [COLOR="red"]Comment [ArrayExpress Data Retrieval URI][/COLOR] and i have done it but i could not parse distinct or unique attributes which is not repeated in every files. I would like to parse … | |
hi, i was just wondering if someone could point me in the right direction on how i would go about writing up code for displaying a plane-collection of harmonic oscillators. i would like to display them as oscillating spheres. i have code written up for graphing 1-d coupled oscillators and … | |
I have to use the function [I]ask_number()[/I] so that is ask the player for a guess with a call to [I]ask_number()[/I] here is my code but it automatically guess the number and i dont know if i did it right [CODE]import random print "\tWelcome to guess my number!" print "nI'm … | |
[COLOR="Red"][U]PYTHON:[/U][/COLOR] I have no idea where to start this, but i need to write code that takes a list of real numbers as input and returns the average of the numbers in the list. any input as to how i would go about starting this code would be much appreciated. | |
How would I write a code to read in this book.txt [CODE]title*Programming PHP author*Lerdorf, Tatroe and MacIntyre publisher*O'Reilly Media description*3 This book covers the PHP programming language. It assumes the reader has some programming experience. It covers connecting to Oracle and MySQL databases. title*Core PHP Programming author*Atkinson publisher*Pearson Education description*3 … |
The End.