14,951 Topics

Member Avatar for
Member Avatar for besktrap

hi everyone! I have two files, main.py and sprite_class.py. sprite_class.py is in a separate folder called lib. here's a quick diagram: ------------------------------------ /folder engine/ main.py /folder lib/ sprite_class.py ------------------------------------ ...sprite_class.py contains a class called Sprite: [CODE] # sprite class class Sprite(): def __init__( self, start_x, start_y, image_path ): self.x = …

Member Avatar for besktrap
0
10K
Member Avatar for leegeorg07

hi again i want to make something that captures images of my window and sove them into either a gif file or a video file, i thought about using win32s [code] win32gui.GetDesktopWindow() [/code] but i wasnt sure how to use this to save it to the file how could i …

Member Avatar for jworld2
0
106
Member Avatar for 136456

Hi every bod y I am new in programming and I like to start with pyqt but I can not find anything for learning in internet please help me how how can I write program with gt designer & when I make a form in qt how can it work(my …

Member Avatar for Ibn Saeed
0
266
Member Avatar for Dart82

Hello, Im currently writing code for a program that translates a line of text from English into German then back again. Its a big loop that needs to be executed the same number of times as words in the text. I'm almost there but there doesn't seem to be anything …

Member Avatar for Dart82
0
94
Member Avatar for gbrokaw

Hey everyone, I'm writing a program with a Tkinter GUI for my job and I was wondering whether there is a way to create an icon on my desktop to start it so I don't have to start Idle and run the program from that (computer un-savvy people will need …

Member Avatar for gbrokaw
0
134
Member Avatar for apollo1492

Im writing this program that draws a bar graph showing an investment growth. and this error keeps coming up and i cant figure it out. this is the syntax that python keeps telling me. Traceback (most recent call last): File "C:\Python26\lala.py", line 68, in <module> main() File "C:\Python26\lala.py", line 47, …

Member Avatar for apollo1492
0
137
Member Avatar for jwatte

I am embedding Python 3.0.1 on Windows, using MSVC 2008 sp1. I do not pass FILE* structs to Python, so I think compiler version differences is not a problem. The following code has a problem, in that the "txt" string that comes out at the end only contains the character …

Member Avatar for jwatte
0
351
Member Avatar for blair.mayston

Hi , Have downloaded a feed from a news site and trying to show only the first paragraph for each story. At present, the output to email looks like this: "http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&objectid=10568455&ref=rss" Man arrested after pointing fake gun at police (A 59-year-old man has been arrested after pointing an imitation gun …

Member Avatar for targ
0
183
Member Avatar for hunterm

So I am trying to create a mirror image that is horizontal. I am having trouble getting the actual image to mirror because I am not sure how to go about doing this. I am using PIL 1.1.6 and Python 2.5.4, if that matters. So far I have: [code=python] def …

Member Avatar for hunterm
0
630
Member Avatar for Siaa

hello friends........ i need a program which counts the total number of galaxy stars of an image.........i think if the RGB value is less than 50.....then is wont be a star otherwise it will be detected as a star......all the clusters of the stars joined together should be considered as …

Member Avatar for Nick Evan
0
113
Member Avatar for xeo

Hi there, I need to know how to get the hard disk serial number, in windows. Thank you in advance.

Member Avatar for EAnder
0
5K
Member Avatar for rainobw

can anyone of u guyz get me out of da problem m having m sure u guyz can ... i had the python re-captcha thingy to enter the captchas on a website but now tht website has putted some code on the captchas nd re-captcha script is not working someone …

Member Avatar for jlm699
-1
197
Member Avatar for DaveF0223

I'm trying to use a DLL that I have used many times in other languages including C, Java, Perl, etc so I am pretty familiar with the library, but I didn't write it. It came from a comercial source. I'm using ctyps to load the library as such: [code] from …

Member Avatar for jlm699
0
170
Member Avatar for ihatehippies

I have a shared drive that I'm trying to access from another computer on the network with a script. I keep getting IO errors(does not exist), is there a module that deals with network locations? -thanks

Member Avatar for vidaj
0
90
Member Avatar for yemu

Hi All, I've been learning python for some time, and I really like it. I used this forum many times, and found answers for many of my questions. Unfortunatelly I can't find answer for my current problem: I have two lists (both the same size) and I need to sort …

Member Avatar for vidaj
0
2K
Member Avatar for ak118

Hey guys. I'm a college student who just took a introduction to programming course for general credit. We are learning how to program with python. I am having real trouble with creating a graphical tic tac toe game. I am just a beginner and any help would be appreciated. This …

Member Avatar for mvmalderen
0
976
Member Avatar for gotm

So here is my program: [code=python]#!/usr/local/bin/python #Scott Landau #CS 380 #Assignment 1 Programming Portion in Python #Created - 4/6/09 #Last Edited - 4/22/09 import pdb #n is going to be equal to 4 for this queens problem. n = 4 #Assigning the empty list to initialState. initialState = [] #Making …

Member Avatar for targ
0
142
Member Avatar for nonang

New python autodidact: please help with sorting the list "weather" in python using bubble sort, insertion sort, merge sort, quick sort, and selection sort.

Member Avatar for jlm699
0
112
Member Avatar for bhanu1225

Hello all. For getting the values from text field, we use [COLOR="Red"]".get"[/COLOR] function. I would like to get all the contents from the [COLOR="Red"]text area[/COLOR]. What is the function to use.

Member Avatar for Mearah
0
93
Member Avatar for Joe Hart

Hi, This is my first post to this forum. I am just a beginner so I am not really sure what everything in my code does. Below is my python code. I would like to change the code to ask the user where the files are located and automatically update …

Member Avatar for Mearah
0
168
Member Avatar for harrykokil

hi guys.. ive tried to integrate a timer code (which works fine) into a tkinter window but im having errors. can u plz fix it 4 me? thanks. this is the code i want to integrate. [icode] import Tkinter as tk import time def start(): global count_flag count_flag = True …

Member Avatar for jlm699
0
112
Member Avatar for Straightone

My question is how do i call the variable Neotile from the main function into the Neo() function and then redefine it and return it back into the main function at the begging of the while loop so it is redefined? [code]from p2lib import * from string import * def …

Member Avatar for adam1122
0
144
Member Avatar for gotm

How come this just hangs, after debugging I found it never returns True for precondition even though it should on the very first go around....ugh!!! [code=python]#!/usr/local/bin/python #Scott Landau #CS 380 #Assignment 1 Programming Portion in Python #Created - 4/6/09 #Last Edited - 4/8/09 import pdb #n is going to be …

Member Avatar for gotm
0
140
Member Avatar for Trav580

Ok, so I just started using Python last week and I have written 4 VERY simple, non-GUI programs. This is for my intro to game physics class and I happen to be stuck on the last project until my next class. What this project is SUPPOSED to do is ask …

Member Avatar for Trav580
0
447
Member Avatar for vidaj

Hi, In my current project I'm trying to compose some objects at runtime based on a string containing the object-configuration. Based on the "Favour composition, not inheritance" pattern, but done runtime. My usecase: I have a downloader that downloads web-pages. The downloader is configured with a set of request-handlers and …

Member Avatar for vidaj
0
103
Member Avatar for guano

Dears, I am staring to learn python/wxpython in order to make an app aimed at structural geology analysis. As usual, I am starting with something simple, and after I get the way of it, make it more complex. The idea is (what I have running so far): a window with …

Member Avatar for scru
0
515
Member Avatar for daviddoria

I need to get an unknown number of file names from the command line, ie ./python MyScript.py --Files 1.txt 2.txt 3.txt [code] parser.add_option("-n", "--NumFiles", type="int", help="Number of files") parser.add_option("--Files", nargs=options.NumFiles, help="a triple") (options, args) = parser.parse_args() [/code] Clearly this will not work because options.NumFiles is not available until after parse_args() …

Member Avatar for daviddoria
0
193
Member Avatar for daviddoria

I want to parse some simple arguments from the command line. This shows all of the arguments: [code] #!/usr/bin/python import sys #print all of the arguments for arg in sys.argv: print arg [/code] but I want to handle something like [code] --file a.txt [/code] or [code] --x 12 --y 13 …

Member Avatar for jlm699
0
107
Member Avatar for mhangman

Hi, Im trying to write an irc client with python. This is its login page(i hope it will be) [CODE] #!usr/bin/env python # -*- coding: utf8 -*- import gtk, sys, socket class PyApp(gtk.Window): def con(self): iserver = self.entry.get_text() inick = self.entry2.get_text() room = self.entry3.get_text() password = self.entry4.get_text() socket.server = iserver …

Member Avatar for mhangman
0
98
Member Avatar for mitchandsuzy

hi everyone, I have searched for and answer to this and cannot find any solution. So please forgive me if it is a straight forward answer! I have a module that is imported. It has a number of subroutines inside it that need to be run, one for each year. …

Member Avatar for mitchandsuzy
0
83

The End.