15,180 Topics
| |
Hello all, I'm in an intro to Python class and I had to pick a project to do. It involves moving a bucket to collect balls. I tried this with pygame already, might I add, and I decided to do it with just tkinter. My question is as follows. I … | |
Hi, I got a server with several of IP's at. Those IP's I want to create sockets through and afterwards from a client, and afterwards send a socket to a webpage. The problem is that I want to use the IP that the client is calling to create the socket … | |
Hi, I have started a new app in my current Django project and I want to make the new app use its own database. I have found this solution on the web: [URL="http://www.eflorenzano.com/blog/post/easy-multi-database-support-django/"]Django Multi-Database support[/URL] but it seems more like a hack than a supported solution. Do you think this … | |
This is not a real program but a feasibility test. The purpose is to: 1. create a bunch of bitmapbuttons on a scrolling window from the contents of an image directory. 2. When the user clicks on their favorite button something should happen. The nice part is that 1 is … | |
Hi there. I have made a program in Python with PyGame and PyOpenGL to test out vertex and pixel (fragment) shaders. I would like to be able to right click on the shader file (just a text file with a custom extension) and choose Open With... and then open with … | |
Could use some advice, as always it's greatly appreciated. I know I could have ripped this code off from anywhere but I'm really trying to learn this the right way. Not sure what I am doing wrong here to make my If Elif part of function not work correctly. It … | |
Hi, I have data which begins with TEXT which is exactly 13 lines (variable number of characters) followed by BINARY DATA (exactly 262144 chars). It looks like: [QUOTE] BASELINE NUM: 258 MJD: 54270 SECONDS: 28321 CONFIG INDEX: 0 SOURCE INDEX: 2 FREQ INDEX: 0 POLARISATION PAIR: RR PULSAR BIN: 0 … | |
Hi, Im trying to make a brick game, im only allowed to use vpython, not pygame. I am having trouble getting the ball to change direction and to bounce off the bricks, could you look over my code, and lemme me know? if you could email me at <EMAIL SNIPPED> … | |
I need to install python 2.4 on a fedora 3 system. I followed the instructions in [B][url]http://www.python.org/download/releases/2.4/rpms/[/url][/B] i have the following contents in [B]/etc/yum.repos.d/python24.repo[/B] [B][python24] name=Fedora Core 3 - $basearch - Python 2.4 baseurl=http://www.python.org/ftp/python/2.4/rpms/fedora-3/ enabled=1 gpgcheck=1[/B] further following the instructions, [B]rpm --import [url]http://www.python.org/ftp/python/2.4/rpms/KRUD-GPG-KEY[/url][/B] gave me: [B]error: [url]http://www.python.org/ftp/python/2.4/rpms/KRUD-GPG-KEY:[/url] import read failed.[/B] … | |
I am writing a chutes and ladders game for a class, and it's mostly working but I can't figure out how to make the chutes and ladders work. Can I please have some hints? [CODE] board = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, … | |
Here's my situation. Let's say I would like to create a thread that continually prints the number 1. When a button is clicked the value should then change to 2. My issue is that I'm unsure how I change a variable in an already running thread. Here's my code: [CODE] … | |
hello there I'm trying to chroma key an image and i don't really know where to start. I am using python coding with quickdraw as my image displayer. I am trying to: first prompt the user for location of Quickdraw, foreground image and background image. second i want image rasters … | |
Hi All I was hoping for some advice based on the pool of experience here at Daniweb. I've been teaching myself to program in Python and I'm starting to get the hang of it, now I'm able to write small programs to automate administrative tasks as well as some complex … | |
[CODE]import ConfigParser replace_name = "Bob" replace_comment = "Bob was here" parser = ConfigParser.RawConfigParser() parser.optionxform = str # make option names case sensitive parser.read("/home/asdf/Dev/python/info_icons/test.desktop") parser.set("Desktop Entry", "Name", replace_name) parser.set("Desktop Entry", "Comment", replace_comment) parser.write(open("modified.desktop", "w"))[/CODE] The code above reads and writes changes to a configuration style file in Linux (actually the one … | |
Okay, so I'm writing this trivia game with graphics and whatnot. I'm not that far along, but every time I try to just have one question come up, all of them do. It's frustrating because I've looked at a ton of examples and can't see where I'm going wrong. Here … | |
[B]hi.... i created a telnet connection to a remote server using telnetlib and excuted few commands using telnet.write. can't a python script residing on the remote host be run using telnet.write? i.e, do something like telnet.write("./script_name.py argument1 arguement2........") after the connection is established?[/B] | |
Okay. So I'm writing this snakes and ladders game, and I want to be able to save the scores, but the try/except method seems to be giving me trouble. I feel like it has something to do with the fact that I'm not writing, just reading. But I'm not sure … | |
I am using an Hp Pavilion a1253w running Xp media edition. It has python preinstalled on an hidden hp bin path. If I try to open it ask me to install in folder python22, or select new folder. Can I use this installation, or will it harm what hp is … | |
Hi, I'm trying to create a piece of code which joins a line that matches a string, and the next succeeding line (no matter what this line contains). I'm getting confused at what Regular Expression (RE) to use. So far I have: [CODE] input1 = open("out.txt","r") output1 = open("outp.txt","w") with … | |
So her is my problem I have a Macbook running OS 10.6.5 and i have python 2.x and 3.x installed on it and I can run python in the terminal but if I try to run the idle it just bounces for a few seconds then disappears. can anyone help. | |
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): … |
The End.