Search Results

Showing results 1 to 40 of 43
Search took 0.00 seconds.
Search: Posts Made By: kiddo39 ; Forum: Python and child forums
Forum: Python Oct 21st, 2009
Replies: 2
Views: 236
Posted By kiddo39
Wow :) very impressive and exactly what I was looking for. Thanks!
Forum: Python Oct 21st, 2009
Replies: 2
Views: 236
Posted By 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...
Forum: Python Jul 14th, 2009
Replies: 7
Views: 760
Posted By kiddo39
Thank you guys for your replies!
Forum: Python Jul 13th, 2009
Replies: 7
Views: 760
Posted By 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...
Forum: Python May 22nd, 2009
Replies: 7
Views: 570
Posted By kiddo39
jlm699, thank you! That helped alot!
Forum: Python May 22nd, 2009
Replies: 7
Views: 570
Posted By kiddo39
I put a loop up of numbers to show that I can run a loop with a given amount of chars. I can add 2 more values to it if a list of 5 is what I'm after. Running the numbers loop will produce:
0 0 0
0...
Forum: Python May 21st, 2009
Replies: 7
Views: 570
Posted By kiddo39
Thanks for the reply. Here's part of my problem with that:

for i in range(97,122):
for j in range(97,122):
for k in range(97,122):
print chr(i),chr(j),chr(k)

That type of loop will...
Forum: Python May 21st, 2009
Replies: 7
Views: 570
Posted By 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
Forum: Python May 21st, 2009
Replies: 12
Views: 829
Posted By kiddo39
Yes it worked....I did finally figure it out.
Forum: Python May 20th, 2009
Replies: 12
Views: 829
Posted By kiddo39
:) I think I figured it out:


y = 0
for x in range(width):
if pixel_dict[(x,y)][2] > 0:
print( "(%d, %d): %s"% (x, y, pixel_dict[(x, y)]) )
Forum: Python May 20th, 2009
Replies: 12
Views: 829
Posted By kiddo39
When I run this:

from PIL import Image

img = Image.open('10x.bmp')
for pixel in img.getdata():
if pixel[2] > 0:
print pixel

it works but doesn't have the x,y positions. When I...
Forum: Python May 20th, 2009
Replies: 12
Views: 829
Posted By kiddo39
I'm bumping this thread to see if I can get a reply....the code by sneekula works for what I need but I can't figure out how to get it to just print out the ones where the 'B' value is greater than...
Forum: Python May 15th, 2009
Replies: 12
Views: 829
Posted By kiddo39
I wanted to edit the above thread but anyway.....I got it to loop through so now the last thing I need to work out is how to get it to print out just the values where 'B' is > 0, like in the first...
Forum: Python May 15th, 2009
Replies: 12
Views: 829
Posted By kiddo39
Wait a sec.....after playing around with sneekula's code for a while, I realized that it works, it's just printing out 1 row.

# testing ...
# show contents of the first row
y = 0
for x in...
Forum: Python May 14th, 2009
Replies: 12
Views: 829
Posted By kiddo39
Thanks for the replies. Sneekula, that's along the lines of what I'm after but when I run that on the image I have, it doesn't print out the B values like with the first code I posted.
My code on my...
Forum: Python May 13th, 2009
Replies: 12
Views: 829
Posted By kiddo39
I'm trying to locate the 'x' positions of certain pixels. Here's and example image:
http://img404.imageshack.us/img404/3418/10x.png

if I run this code it gives me the 88 'odd' pixels that I'm...
Forum: Python May 6th, 2009
Replies: 2
Views: 289
Posted By kiddo39
Forum: Python May 6th, 2009
Replies: 2
Views: 289
Posted By 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...
Forum: Python May 5th, 2009
Replies: 2
Views: 251
Posted By kiddo39
Forum: Python May 4th, 2009
Replies: 2
Views: 251
Posted By 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)
Forum: Python Mar 30th, 2009
Replies: 4
Views: 609
Posted By kiddo39
Wow....now if that prints out that particular list of tuples, how could you go about locating a pixels x,y position? Let's say one of the R,G,B tuples was this: (255,0,9) and you wanted the position...
Forum: Python Mar 30th, 2009
Replies: 4
Views: 609
Posted By kiddo39
Hi, how can I open an image and get the R,G,B values of just the first line?


from PIL import Image

im=Image.open("image.bmp")
img=im.getcolors()
print img
Forum: Python Mar 11th, 2009
Replies: 3
Solved: PIL help
Views: 410
Posted By kiddo39
Ok, thank you. That will work.
Forum: Python Mar 10th, 2009
Replies: 3
Solved: PIL help
Views: 410
Posted By kiddo39
What can I use to examine the RGB values of an image :(

Here's an example image:
http://img27.imageshack.us/img27/8047/64892319.png
Forum: Python Mar 10th, 2009
Replies: 3
Solved: PIL help
Views: 410
Posted By 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.


Import Image, PIL

im=Image.open("image.bmp")
ans=im.getdata()
print ans
Forum: Python Feb 5th, 2009
Replies: 0
Views: 826
Posted By 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...
Forum: Python Feb 4th, 2009
Replies: 3
Views: 653
Posted By kiddo39
Wait, I think I've got it:


>>>x=1234567
>>>sum(int (i) for i in str(x)])
28
Forum: Python Feb 4th, 2009
Replies: 3
Views: 653
Posted By kiddo39
Something like this will work, I just have to get it to the point that it does it without the 'raw_input'......

>>>sum([int(i) for i in raw_input("Enter integer: ")])
Enter integer:1234567
28
Forum: Python Feb 4th, 2009
Replies: 3
Views: 653
Posted By 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
Forum: Python Feb 4th, 2009
Replies: 2
Views: 370
Posted By kiddo39
Ah....! That's it! I didn't realize I could add 'not' like that. Thanks again
Forum: Python Feb 4th, 2009
Replies: 2
Views: 370
Posted By 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...
Forum: Python Feb 4th, 2009
Replies: 2
Views: 562
Posted By kiddo39
Forum: Python Feb 4th, 2009
Replies: 2
Views: 562
Posted By 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:
...
Forum: Python Jan 8th, 2009
Replies: 7
Views: 689
Posted By kiddo39
Wonderful! Those work great! Thanks!
Forum: Python Jan 8th, 2009
Replies: 7
Views: 689
Posted By kiddo39
Great! Thanks for the replies. One more question about it....since some green pixels are brighter than others, is there a way to make an 'if' statement for it, to cover the entire range? Something...
Forum: Python Jan 7th, 2009
Replies: 7
Views: 689
Posted By 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...
Forum: Python Dec 3rd, 2008
Replies: 2
Views: 1,032
Posted By 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...
Forum: Python Nov 15th, 2008
Replies: 1
Views: 555
Posted By 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...
Forum: Python Nov 7th, 2008
Replies: 5
Views: 1,248
Posted By kiddo39
Yes :) just what I was looking for, thank you
Forum: Python Nov 7th, 2008
Replies: 5
Views: 1,248
Posted By 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',...
Showing results 1 to 40 of 43

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC