Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~43.1K People Reached
Favorite Forums
Favorite Tags
Member Avatar for kiddo39

I have code that when executed will give me a long list output, which is fine, but how can I get it to print without the parenthesis and commas? example: answer =('7', 'Q', '5', 'H', '9', '4', '3', '8', 'L') but I'd like it to print like this: 7Q5H9438L I …

Member Avatar for TrustyTony
0
31K
Member Avatar for kiddo39

I'm trying to use this code for a fibonocci sequence where I'm setting the starting numbers as b= and c=. What I'd like to do though is have it stop after so many numbers are added together, in this case it would be 53rd (a=53). I've tried a 'for i …

Member Avatar for HiHe
0
222
Member Avatar for kiddo39

Hi, If I have a sentence like this: "I now have a total of % yellow bananas!" but I need it to change the number 2 to a 3, print, then a 4, print, etc until it reaches a set number like 10, how can I go about that? sentence …

Member Avatar for kiddo39
0
271
Member Avatar for kiddo39

Hi, I'm trying to run code that asks a yes or no question. If a yes or no isn't entered, then the question will continue to re-ask say every 3 seconds until a yes or no is entered. Here's the basics of it: [code] while True: response = raw_input(" Are …

Member Avatar for jeugtsy
0
654
Member Avatar for kiddo39

I'm having trouble getting my python scripts to insert into a mysql database. I'm able to do other commands successfully such as adding or dropping tables, selecting items from tables but inserting into tables isn't working. I can manually insert but the script won't do it. I have an entry …

Member Avatar for richieking
0
126
Member Avatar for kiddo39

I've been working on a project lately that is written in python and I want to incorporate mysql into it. The python code is basically a sales report writing system in which every sales report will have it's own number such as 10-0001, 10-0002 and will contain customer information like …

Member Avatar for smantscheff
0
162
Member Avatar for kiddo39

Hi, I've been using tkinter to write a program that has a root window and many toplevel windows. I was able to create them successfully but my next step was to incorporate mysql with it so it would actually store any data that was entered in the various entry fields. …

Member Avatar for TrustyTony
0
1K
Member Avatar for kiddo39

I have an array of numbers and want to print out how many of each number there are in the array. My method works but I was wondering what a more efficient way of doing this would be. I figure a loop would work but I haven't figured out how …

Member Avatar for kiddo39
0
116
Member Avatar for kiddo39

How can I write a loop using letters instead of numbers so it looks like this: 2 sets used 'a-z' and 'A-Z' aaaaa aaaaA aaaAa aaAaa and so on: aaaAA then on to b: bbbbb bbbbA I can do it with numbers, something like this: [code] for i in range(10): …

Member Avatar for kiddo39
0
4K
Member Avatar for kiddo39

I'm trying to locate the 'x' positions of certain pixels. Here's and example image: [url]http://img404.imageshack.us/img404/3418/10x.png[/url] if I run this code it gives me the 88 'odd' pixels that I'm looking for: [code] from PIL import Image i = Image.open('10x.bmp') # I save it as a bmp for pixel in i.getdata(): …

Member Avatar for kiddo39
0
2K
Member Avatar for kiddo39

I can't seem to figure out what's wrong with this simple code. I have a user input and if it matches prints out 'That's good', if not prints out 'Too bad' but how can I get the input to ignore being case sensitive? [code] ans=raw_input("Are you feeling well today? ") …

Member Avatar for kiddo39
0
103
Member Avatar for kiddo39

I am printing out the R,G,B values of an image and get results like this: (30, 0, 0) (29, 0, 0) (28, 0, 0) (27, 0, 0) (26, 0, 0) (25, 0, 0) (24, 0, 6) (23, 0, 0) (22, 0, 0) (21, 0, 0) That is just a partial …

Member Avatar for kiddo39
0
112
Member Avatar for kiddo39

Hi, how can I open an image and get the R,G,B values of just the first line? [code] from PIL import Image im=Image.open("image.bmp") img=im.getcolors() print img [/code] I've tried im.getdata() , im.histogram, etc.... but again, what I'm looking for is more of R,G,B pixel counts for just the 1st line …

Member Avatar for lllllIllIlllI
0
145
Member Avatar for kiddo39

Hi I'm trying to use PIL to get data from an image and find 'unusual' RBG values but haven't found the right way. [code] Import Image, PIL im=Image.open("image.bmp") ans=im.getdata() print ans [/code] This doesn't examine the RGB values for me to find any unusual ones. If tried others like: im.load() …

Member Avatar for kiddo39
0
299
Member Avatar for kiddo39

I'm trying to auto send a form submission to a website but it isn't working. I've done this before and it worked but for some reason, using the same basic code, it doesn't seem to submit it. I'm using urllib & urllib2 to open the page and re to parse …

0
95
Member Avatar for kiddo39

I know python has math functions like 5+6 and 5*6 and 5/6 etc...but I have something like this: x=575124357 and need to add them all together: 5+7+5+1+2+4+3+5+8=40

Member Avatar for kiddo39
0
65
Member Avatar for kiddo39

I have a randomly generated list of which contains letters, symbols, and numbers and need to separate it into 2 lists -one of numbers and one of the remaining chars. Then I need to separate the numbers into 2 lists-one of composite numbers (4,6,8,9) and one a list of prime …

Member Avatar for kiddo39
0
123
Member Avatar for kiddo39

Hi.....I have a long string of letters and symbols and I need to increment their ascii value by 1. How can I do that? Here's an example of the string: s="p@ugdyhtapbcedoamguh?a#vdaxdv$zdoxw?pu$exrbzt evk#n$xjlgpmece??$$@@yyiw##rmn$nmrblruv ?azxdsoh#$@nndkkt?k@ihatywtbazgbq#ykshx" so like # becomes $, etc

Member Avatar for kiddo39
0
67
Member Avatar for kiddo39

This code from Vegasseat worked when I made my own bitmap image to count red pixels. I now want to count green pixels so I changed the code. Again, when I make my own bitmap it will count the green pixels but why won't it count them in an image …

Member Avatar for kiddo39
0
337
Member Avatar for kiddo39

I have a small image with a black background and red lines in it and I need to count the red pixels. I know I need PIL, but I'm not sure which method to use. Then once I have the counts I need to equate them to a character, so …

Member Avatar for vegaseat
0
2K
Member Avatar for kiddo39

Hi, I need to write a partial ocr for just 2 characters but I don't know where to start. The 2 chars are '8' and 'F'. The 8 is only comprised of two arcs and the F is one vertical stroke and 2 horizontal strokes. I cannot use pytesser for …

Member Avatar for woooee
0
77
Member Avatar for kiddo39

Hi, I have 2 things I'd like help with: 1) is there a way to find the exact center of my screen? 2) a loop Here's what I need the loop for: [code] image = ImageGrab.grab((0,0,800,800)) box = (100,100,400,400) im = image.crop(box) im1 = im.save("screen.jpg") # at this point I …

Member Avatar for kiddo39
0
109