15,175 Topics

Member Avatar for
Member Avatar for BrianK_CA

I'm having a heck of a time sorting a TreeListCtrl. I've found very little documentation on it, so I went out & bought a book called "wxPython In Action". It says something along the lines of "a tree list control is so similar to list control, we won't go into …

0
42
Member Avatar for thatoneguyx

I have 2 problems -- 1. When I try having IDLE list the modules of python it gives me this error: [code]Traceback (most recent call last): File "<pyshell#7>", line 1, in <module> help() File "D:\Programs\Python\lib\site.py", line 346, in __call__ return pydoc.help(*args, **kwds) File "D:\Programs\Python\lib\pydoc.py", line 1648, in __call__ self.interact() File …

Member Avatar for Scuppery
0
118
Member Avatar for swills

I started Python, imported Tkinter assigned Tk() to root, imported snack and initialized it. i then made a sound object, read a sound from the hard drive and then played it. i couldn't hear any sound though. any idea what the problem may be?

Member Avatar for vegaseat
0
73
Member Avatar for safir8100

Hi, I have a program: [code] def AdjacencyMatrix(dim, pairs): matrix1 = (zeros((dim,dim))) for (first,second) in pairs: matrix1[first,second]=1 matrix1[second,first]=1 print '\nAdjacency Matrix\n' print matrix1 [/code] But I get an error: TypeError: 'int' object is not iterable Can anyone help? Thank you!

Member Avatar for vegaseat
0
75
Member Avatar for twix112

Has been working on performance graphs for a cluster of server over the last couple of week for a company with matplot lib and python. The prolem is that the picture that's been published of the graph has a couple of labels that they feel is 'hard to read' 'cause …

0
52
Member Avatar for dinilkarun

Hi, I am unable to set the size of the DirPickerCtrl. The 'Browse' button is getting placed behind the textbox. Please help me out with this if anybody has worked on it. Regards, Dinil

Member Avatar for jlm699
0
143
Member Avatar for Mazille

I get an error when trying to make this program. [code=python] from pointLine import * def calcSlope(x1,y1, x2,y2): slope = (x2-x1)/(y2-y1) return slope def calcPointOnLine(y, m, x, b): if y == (m*x)+ b: return True else: return False print "Point is on a Line? Program" line1 = [(1,7), (7,19)] x1 …

Member Avatar for Mazille
0
135
Member Avatar for linkrulesx10

I need an if statement that will run if the value is not a number. I am unsure how to do this in python I have tried looking around and I can't seem to find what I need. If Input is not <a number> Also if you can help me …

Member Avatar for linkrulesx10
0
5K
Member Avatar for jobs

[code=python] data = unpack('>L', sock.recv(4)) [/code] Does this line of code means, incoming data is big endian and so unpack to endianess of local machine and assign to data. If local machine is little endian, then big endian is automatically converted to little endian format?

Member Avatar for jrcagle
0
57
Member Avatar for Shadow14l

I just need some code that will return a string of the name of the current activated window title/name. I've spent almost hours looking for a simple example though... ================================================================ I've seen other people say to hook windows messages and listen for wm_activate, and others... I already have when to …

Member Avatar for Shadow14l
1
15K
Member Avatar for dz0004455

I have an html file and I am parsing it with regular expressions. I don't want to use any python html libraries, because I am not using it as a website, but as a configuration type file. I am making a basic bookmarks system, the parser works fine, so I …

Member Avatar for dz0004455
0
232
Member Avatar for R.V.

I found: IDLE 1.2.2 >>> x = 157.73 >>> r = x * 100. >>> int(r) 15772 Can I convert more precise?

Member Avatar for R.V.
0
153
Member Avatar for MikeyFTW

Sorry im kinda new at this but anyways... Ok heres the deal i need to make this program that will allow users to practice their addition and subtraction for whole numbers between 1 and 100, 1 and 200 and 1 and 500 (the levels of difficulty). The user will be …

Member Avatar for MikeyFTW
0
190
Member Avatar for myle

I have just begun to learn python, so my question is probably silly. Just for practice I want to write a function which calculates the first n primes. prime computes some prime numbers and keeps them in a list. Then tries another number and if it's not even divisible by …

Member Avatar for myle
0
138
Member Avatar for tommy1988

hi i wanna start programing with python just wondering if any one knew any sites which has python source code? would appreciate any help :)

Member Avatar for AKarnisky
0
213
Member Avatar for docaholic

i'm having problems with a binary search in a list... [code] def binarySearch(list1,faces): first = 0 last = len(list1) - 1 while first <= last: mid = (first + last) / 2 if faces == list1[mid]: return mid elif faces < list1[mid]: last = mid - 1 else: first = …

Member Avatar for woooee
0
69
Member Avatar for shadwickman

Hi, just a quick question but I couldn't find an answer to it. Say I have 3 variables, "a", "b", and "c". I want to assign each one a value of None. The only way I know of doing this is: a, b, c = None, None, None Is there …

Member Avatar for shadwickman
0
118
Member Avatar for leegeorg07

Hi i want to be able to open a python program on someone's computer but they don't have python installed and they don't have room to install it. how could i 'compile it' if that is the correct word, so that it can be opened as an exe file?

Member Avatar for vegaseat
0
104
Member Avatar for Edwards8

So, I wrote a little script to convert tifs into jpegs. The tifs are about 600mb in size, I reduce the size, and then convert. Here is the code in its entirety: [code=python] ## First we import the image library, Image object, and garbage ## collector, as well as os …

Member Avatar for woooee
0
429
Member Avatar for ALPHA_Wolf

One of my clan members put together the following script in python. It works great but I have a small problem. I have to have a 2nd copy under another name to take care of our game servers with a different password. Now I know nothing whatsoever about python so …

Member Avatar for woooee
0
184
Member Avatar for priyavardheesh

Hi, I'm trying to pass form values to my python script that's on the server. I don't have to return anything to the user. Just send the client side values. My page is a simple HTML page and on the click on button, a javascript function is called. This function …

Member Avatar for buddylee17
0
116
Member Avatar for Capt.Micro

Hi all, Ive been working on this script for a while, but, when I try to send it I get an IO error because, from what I see, its not saving the "temp.jpg" file. Not so important, the save function has the same problem. All the ports are okay, And …

Member Avatar for Capt.Micro
0
248
Member Avatar for nemtaro

Hi there, I need to move the mouse cursor and generate mouse click events in X, and I'm hoping to use Python. I understand that the standard Xlib library provides a XWarpPointer function which moves the cursor around. This works for me in C, but I can't seem to find …

Member Avatar for nemtaro
0
524
Member Avatar for dilbert_here00

Hi All, I made a python ftp client on Windows XP which does binary get & put. The issue here is that when I do FTP manually the time taken to either GET or PUT is about half the time taken by my ftp client. Following is a snippet of …

Member Avatar for jlm699
0
93
Member Avatar for Miyuki

I want to let users select a line of text by triple-clicking anywhere on that line. How can I use the API to support the feature?

Member Avatar for Scuppery
0
60
Member Avatar for joshuabraham

hi guys,when i run my program which contains the following portion of code in the mainloop Code: ( text ) [CODE] 1. clock=pygame.time.Clock() 2. while True: 3. sound1.play() 4. clock.tick(60) 5. pKeys = pygame.key.get_pressed() 6. Eves=pygame.event.get() 7. villian.face() 8. villian.hert() 9. if Eves[KEYDOWN] and pKeys[K_UP]: 10. hero.moveup() 11. if Eves[KEYUP] …

Member Avatar for jlm699
0
155
Member Avatar for programmingnoob

Expected Output Your goal is to be able to create a python script like example.py that will: 1. Read input.bin byte by byte 2. Convert the value of each byte in input.bin into a string 3. Save the output into a file output.txt For example, given an input.bin that contains …

Member Avatar for jlm699
0
113
Member Avatar for tweak

I started this hangman game as a suggestion for beginners but now I am stuck. The code runs with out any errors but I need some way to put a certain amount of turns that the user can have but I am not sure how I could add this to …

Member Avatar for tweak
0
99
Member Avatar for tzushky

Hello hello, I am writing to you because I am having trouble obtaining something: I know it should be doable, but can't seem to make an example. I need to be able to run scripts from another central script. And as i' ve been reading, apparently they mustn't be imported …

Member Avatar for woooee
0
85
Member Avatar for pravdexter

I am using python 2.2 and want to make use of the library PyUsb. I tried a lot but couldn't get it right. Can anyone please help how to do that.

Member Avatar for pravdexter
0
168

The End.