15,181 Topics
| |
Hi, I'm trying to make a program in python that solves word puzzles like this: "nj" (the answer to that is "ok") where each letter is off by one, for example a or c instead of b. the program is supposed to generate a list of possible words which will … | |
I would like to execute a script within a "form post" that downloads a python script. This is for the academic field, the python script is a grading script. The student must configure a case study and click a grade button (form post) that runs the python script against their … | |
Hello, This is driving me crazy so here it goes. I'm trying to create a program that finds the 1000th prime number. This is the code I started with to check if a number is prime: [code] numberofprimesfound = 0 numbertotest = 303 divisor = 2 if numbertotest%divisor == 0: … | |
I am currently learning Python and how to work with start and stop indexing. I am doing a project from the book I am learning from and I'm stumped...I need to display a full deck of cards, with [CODE]numbers = ("A", "2", "3", "4", "5", "6", "7", "8", "9", "10", … | |
hey everybody i just upgraded from 2.5 to 2.6 and im having problems with building pymedia since there is no binaries out there -.- this is what im doing and getting [CODE] C:\pymedia>python setup.py build Using WINDOWS configuration... Path for OGG: ..\pymedia\libogg-1.1.4 Path for VORBIS: ..\pymedia\libvorbis-1.2.3 Path for FAAD: ..\pymedia\libfaad2 … | |
I'm attempting to write a program that will take a word entered by the user and give a concatenation of the corresponding triple quote strings. I've looked at [URL="http://www.daniweb.com/forums/thread189881.html"]http://www.daniweb.com/forums/thread189881.html[/URL], but didn't quite find the piece I'm missing. The idea is fairly simple: User inputs a word (or numbers) Exchanges letters … | |
Hi, I have the following problem: I would like to read from a file between to keywords (KEY1 and a line consisting of ------), skipping 4 lines after the first keyword. What I have is the following: [CODE]import re import string infileName = raw_input("filename ") infile = open(infileName, 'r') data … | |
I have been thinking if this is only possible to very very very advanced wxPyees. I have tried and tried to understand this but with no success. I have seen Mike saying the same in wxpy listing and many more. I have started this to hear your experience with printing … | |
I'm a bit confused as to how variables (or fields) of classes are handled in python. I'll give a small example of what I mean. [CODE] class Cow: # the first class that popped into my head legs = 4 moo = cow() [/CODE] now, moo.legs will return 4 and … | |
Hi, I'm running a PCM-9375 system with Linux Debian 5.0.0. I am currently running a a python application on the system continuously, and our system seems to be resetting approximately every 24 hours (not at midnight, but 24 hours from whenever the system was started). I am not sure whether … | |
I have a weird glitch or something, whenever I try to start turtle graphics from the shell it goes unresponsive, but when I run the program in a console window it works. This is really annoying me! Any help would be appreciated. | |
Okay, I am confused on the global statement. To my knowledge it lets you easily access variables from a function to be used in the session. Now someone said that it's useless and you shouldn't use it in your code. Is this true? | |
hello, pls can somebody show me a way how to solve the following exercise: A number, a, is a power of b if it is divisible by b and a/b is a power of b. Write a function called is_power that takes parameters a and b and returns True if … | |
in Vista, cTurtle worked like a charm, but in Ubuntu, when i downloaded the cTurtle to my desktop and moved it to site-packages, it still won't work. When i clicked on the downloaded cTurtle.py file, what i get is a text file with chinese characters, and it closes within a … | |
Hi All Could you please help me with the following, #Convert C to F def Tc_to_Tf (): Tc = input ("What is the Celsius Temperature ? " ) Tf = 9.0/5.0 * Tc + 32 print 'The temperature is ', Tf, ' Degrees Fahrenheit' I get NameError: name 'Tf' is … | |
Hello, I'm posting this code so that maybe it will help someone else in the future. I spent about a week trying to figure this out, and Google searches were not helping. Hopefully anyone else wondering about this will see this post on a Google result. The program I finished … | |
Hi all, I have a php/mysql based site set up. I want to keep my database layer updated via a python script that will query some other systems, parse data and make the appropriate CRUD calls to my database. My question is might be a simple one but I'm wondering … | |
Hi, I've been trying to create a program that gets wikipedia pages, and lists all the links found in the page source. I've used the urllib.urlopen() method to do this, and unfortunately I've run into a little problem. Instead of getting the actual page like say the main page, or … | |
So below is my first attempt at using user input, but I can't figure out how to get the input (at the bottom) to plug into my function definitions. I have no proper python training and am attempting to learn on my own with some books. I would appreciate any … | |
If you own a stopwatch, here is your chance to benchmark the various versions of Python on recursion performance. The Ackermann function gives the old computer quite a workout. | |
| HI, I recently looked at sneekula's ticker code, and I was wondering about any good graph extras, to show it in a simpler form, also any tutorials if at all possible, thanks in advance |
Hello all We are using subversion as our source repository and trying to backup the repo using Subversion hotbackup.py script I am very much new to python scripting and trying to understand the below error message IOError: [Errno 13] Permission denied Exception IOError: (13, 'Permission denied') in <bound method ZipFile.__del__ … | |
HI, I've got a list of 10 websites in CSV. All of the sites have the same general format, including a large table. I only want the the data in the 7th columns. I am able to extract the html and filter the 7th column data (via RegEx) on an … | |
The title doesn't really make sense, as a number with some thing like .23238382 attached to the back of it isn't an integer, but that's not the point. I want to make a program that places commas in the correct position in a number you give. Well, in some of … | |
| I am trying to develop a program using pygame that will let you "paint." There is just one problem, when I change the RGB values, all of the pixles change!!! Please HELP!!! Code: [CODE] import pygame, os pygame.init() pygame.display.init() screen = pygame.display.set_mode((830, 620)) draw = 0 selected = 0 points … |
I am writing a function to extract decimals from a number. Ignore the exception and its syntax, I am working on 2.5.2 (default Leopard version). My function does not yet handle 0's. My issue is, the function produces random errors with certain numbers, and I don't understand the reason. I … | |
This code shows an example of using recursion to simply solve a problem. Note though, it can take a long time to do larger numbers such as the 50th fibonacci numbers this way. Hope this helps! :) | |
Hi all, I'm a completely new user of python (and by new I mean I started using it yesterday) but I've been programming for a couple of years now in other languages such as Java. I have a question to ask you all. So what I want to do is … | |
I was given an assignment to create a high/low program (well, the first part anyway) that fulfills the following pseudocode: • Print instructions to the user • Start with the variables high = 1000, low = 1, and tries = 1 • While high is greater than low ◦ Guess … | |
My app works fine when its a .py file, however as soon as I compile it with py2exe 0.6.9 I get LookupErrors when using the email MIME library. I tried including the "packages": ["encodings"] option in py2exe but to no avail. I'll post the relevant code and traceback. (note: not … |
The End.