15,190 Topics
![]() | |
I am making essentialy a jeopardy game. the problem I am having is I can't get my correct guesses to change the dashes thats being displayed to the guesses value. here are parts of my code. [ def guessing(self): tite = self.character_ent.get() tite = tite.lower() if tite in self.getName(): newer … | |
Hey, So I need help with fractal project, Pythagoras Tree, and below is the code i need to complete. And I really have no idea how to finish. [CODE]from PIL import Image from movieSolution import * import math class ETree(GO): #---------------------- Begin given functions ---------------------------- def __init__(self, color, initSize, order, … | |
Hi, I try to read line by line from a file some data. Each line in that file has the following format: x = 78.36734693877551, z = 11.428571428571429 -> amplitude: 8.62847057093655E-6 | phase -1.5707968246742405\n I am trying to extract those four float numbers using regular expression. I came with the … | |
![]() | Hello ALL! I am trying to get number of hits for a larger list of words (>500), with Pygoogle (from: [url]http://code.google.com/p/pygoogle/):[/url] [CODE] g = pygoogle(<some request>) freq = g.get_result_count() [/CODE] Now, after starting success, probably around 200th request, I start to get only "'NoneType' object is unsubscriptable". Is this Google … |
( It is only in Python 3 ! ) ( The commands to operate this file are at Linux ! : I want to read a file, but it has to be through stdin ( In linux, with "< filename" ) ! And I want to write the same file … | |
im trying to make a word puzzle project but im having a few problems.. i need a 10x10 grid (list of lists) but the important thing about the grid is that the user fill the grid in the following way: a b c d e f g h i for … | |
Hi i am trying to create a function that asks the user to enter height and width then colour to then display each pattern in the selected colours. i made a start but i cant make it work with the colour nor adding size dimensions. [CODE]# mini_project.py from graphics import* … | |
Hi people. I'm trying to create a tictactoe program in python but i'm having some troubles. It's the player against the computer. Now the computer should go on random but still block/win if possible. Right now i'm kinda stuck so feel free to help. I'd prefer it as simple as … | |
[B]hi all, can anyone tell me how to open a folder on a remote machine connected on same LAN. I need to open a folder in the form "\\remote_machine\folder1\folder2\folder3"[/B] | |
ok so i really dont understand this whole recursive stuff and i need some help on a simple program. the problem is to write and test a recursive function max to find the largest number in a list. here is a non recursive function that ive made, [code] def Max(li): … | |
I am working on this program in Python that would allow me to scan for a certain phrase in a certain text document. I used the finditer function in Python's re library.The certain line of code resembled the following: [CODE]phrase=regex.finditer(page)[/CODE] I also had a print statement at the end that … | |
Hello! I'm just beginning to learn Python and I would like you to recommend me any good tutorial. I have started with the [URL="http://www.pythonlearn.com/"]http://www.pythonlearn.com/[/URL] and the [URL="http://hetland.org/writing/instant-python.html"]http://hetland.org/writing/instant-python.html[/URL]. I have found them very useful and I would like to continue learning. Furthermore, I would also like to start learning on programming … | |
Hi, i have created python exe file of my code using py2exe module. i need to add my own customized icon for this exe file how to achive this | |
I'm trying to figure out how to set up a grid using a list of lists. I want the input to be x where the program will then setup a list of x lists, each containing x entries, in this case "0"s. | |
Ok, so i've got one definition on my python code, that defines how to find the position of something in an array, then returns the list of all the places that those things are. Then I've got another definition to find the accurate centroid of a position. How do I … | |
I am working on a project where I need to parse a bunch of user text that comes in different fields. The problem is that the user input doesn't always come in on the same fields. One user might have a name in field 3 and a date in field … | |
try to get the current cursor position without removing the node [CODE]class List(object): ___slot___=('cursor', 'size') def __init__(self): self.cursor=EmptyCircleNode() self.size=0 def __str__(self): result = "<" node = self.cursor count = self.size while count != 0: result = result + str(node.data) if count != 1: result = result + ", " node … | |
I am new to python programming and struggling with a problem I would like help with. I have multiple text files that I would like to join using the first column in each file to serve as the key to align the files. Each file could be several hundred lines … | |
Hey guys I'm having some trouble with a homework question from Zelles python. I have to make a Set class then test a variety of methods. However my teacher wants us to just use lists and not actually sets. I'm getting an error for the setElements method, it keeps saying … | |
Problem with storing extracted values in SQLite - How to adress or index list of values for proper insertion into table. The Regex works fine: input logging data looks like: 0.0.0(06026104) 1.6.1(0.1501)(1011111000) 1.6.1*32(0.1446)(1010190800) 1.8.1(02484.825) 1.8.1*32(02449.574) correct regex output: 06026104 0.1501 02484.796 [CODE] with open("usage.log") as fp: for line in fp: … | |
(Python begginner, please be gently) Hi, i'm having some troubles with turning one python project i made into an executable, using py2exe (via GUI2EXE). The program is compilling well, it generates the executable, but when i try to execute it, i get the following error: ImportError: No module named twitter … | |
So far, I have: [CODE]def printSquare(x,y): for z in range(0,x): print(x*y)[/CODE] printSquare(3,'%') prints out something like this: %%% %%% %%% instead of using the '*' operation, is there a way to print x numbers of y separated by commas (for better spacing) ie: print(y,y,y)? | |
Hi, I want to know how to use Python variables in My sql statement and below is the syntax i am using import MySQLdb name="XYZ" number="123456" db=MySQLdb.Connect("localhost","root","12345","phone") cursor=db.cursor() sql= ("""INSERT INTO phonebook(number, Mobile) VALUES(%s,%s)""" , name,number) cursor.execute(sql) db.commit() db.close() but this throws the error please refer the attached screen shot … | |
Read and Write Image in Python 3.1 ? No lib Thank you so much. | |
Hi there, at university i have to program OO-style in Python. What i got now is a "Point"-class and a "Triangle"-class. The "Triangle"-class has a method [ICODE]a()[/ICODE] that needs to return the length of the AB-edge, but it doesn't instead it concatenates the Point.__str__() methods return values together, which is … | |
it keeps looping over and over again no matter what i put in [CODE]def getScores(totalScores, number): score = input('Enter their score: ') while score <=0 or score >=100: print'You must enter a number between 0 and 100' score = input('Enter a number between 0 and 100:') for counter in range(0, … | |
i get this error when i get to a certain part in the program Traceback (most recent call last): File "C:/Users/Family/Desktop/13.py", line 54, in <module> main() File "C:/Users/Family/Desktop/13.py", line 10, in main averageScores = getAverage(totalScores, averageScores, number) File "C:/Users/Family/Desktop/13.py", line 46, in getAverage averageScores = totalScores / number TypeError: unsupported … | |
hi all, can anyone tell me hoe to open a file from one machine, when the file is present on a remote machine, specifying it's IP address? | |
I am struggling with one part of my specification to complete my program :/, currently it does let me enter different items into containers and creates new containers as they are needed. However now I need the program to handle how it packs the items differently. Before when numbers such … | |
I'm trying to convert text to a variable name. So far, I've been able to solve most things with Google, but this is really frustrating: Error: Traceback (most recent call last): File "C:/Documents and Settings/Some_Kittens/Desktop/Lab20/worldClock.py", line 33, in <module> main() File "C:/Documents and Settings/Some_Kittens/Desktop/Lab20/worldClock.py", line 21, in main while not … |
The End.