Re: [Tutor] python challenges

2005-05-10 Thread Liam Clarke
Ack, banner.p eh? Can anyone explain the significance of the numbers? Are they columns? Regards, Liam ClarkeOn 5/8/05, Max Noel <[EMAIL PROTECTED]> wrote: On May 7, 2005, at 20:50, D. Hartley wrote:> Ok, I hate to ask another question about this riddle. But I have> looked and looked and looked

Re: [Tutor] at a loss: python challenge

2005-05-10 Thread Liam Clarke
Which challenge? If it's number 4, I've not done that one yet. Regards, Liam ClarkeOn 5/11/05, Servando Garcia <[EMAIL PROTECTED]> wrote: Thanks for the advice on how to use url.  I have been following thelinks in the pages but as of yet have not had any luck.Any hints?-- 'There is only one basi

Re: [Tutor] computer screen resolution

2005-05-10 Thread Liam Clarke
I see where you're coming from... Yes, depth refers to 32bit/16bit etc. the flags are documented, but default to fullscreen. So... pygame.display.list_modes(32) will return a list of all possible screen sizes with 32bit colour depth, like so - >>> import pygame.display >>> pygame.display.init

Re: [Tutor] computer screen resolution

2005-05-10 Thread Liam Clarke
If it's built on pygame then the following should work - >From http://www.pygame.org/docs/tut/DisplayModes.html pygame.display.list_modes(depth, flags) Returns a list of supported display modes with the requested depth and flags. An empty list is returned when there are no modes.

Re: [Tutor] following the chain

2005-05-10 Thread jfouhy
Quoting Liam Clarke <[EMAIL PROTECTED]>: > While we're on challenge 4, I assume a linked list is important. Can > anyone point me at a good introduction to linked lists? A linked list, at a high level, is a data structure made of "nodes", where each node contains some data and a pointer to the n

Re: [Tutor] following the chain

2005-05-10 Thread Liam Clarke
While we're on challenge 4, I assume a linked list is important. Can anyone point me at a good introduction to linked lists? Oh, and Servando - I use urllib like this - >>>import urllib >>>opener = urllib.URLopener() >>> page = opener.open('http://www.google.co.nz') >>> pageData = page.read()

Re: [Tutor] [ANN] new version of rur-ple (0.8.5)

2005-05-10 Thread André Roberge
Bob Gailer wrote: > At 12:41 PM 5/10/2005, Andre Roberge wrote: > >> On 5/10/05, Bob Gailer <[EMAIL PROTECTED]> wrote: >> > At 08:48 PM 5/9/2005, André Roberge wrote: >> >> [snip] >> >> >> > On http://rur-ple.sourceforge.net/en/errors.htm Reeborg >> > appears as Egrebor. I assume that's incorrec

[Tutor] Python Challenge Level 6

2005-05-10 Thread Orri Ganel
Hello all, First and foremost, for those who don't know, www.pythonchallenge.com is a set of python-related riddles. Now, for those who are past level six, any sort of hint would be appreciated. Right now, all I know is what module to use (i think) and that I have to somehow use it on channel.jpg

[Tutor] yep, still on python challenges

2005-05-10 Thread D. Hartley
To avoid spoilers: Riddle 7, I've got an 87-item long data structure. Any hints on what to do with it? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] [ANN] new version of rur-ple (0.8.5)

2005-05-10 Thread Bob Gailer
At 12:41 PM 5/10/2005, Andre Roberge wrote: On 5/10/05, Bob Gailer <[EMAIL PROTECTED]> wrote: >  At 08:48 PM 5/9/2005, André Roberge wrote: [snip] >  On http://rur-ple.sourceforge.net/en/errors.htm Reeborg > appears as Egrebor. I assume that's incorrect. >  > You are indeed correct.   Thank yo

Re: [Tutor] RGB, images

2005-05-10 Thread Alberto Troiano
Hey Can you be a little more specific on how to get certain part of the image to analyze? I managed to split it in all its bands (though I don't know what is that) How can I work only with the gray part?? Thanks Alberto >From: "D. Hartley" <[EMAIL PROTECTED]> >Reply-To: "D. Hartley" <[

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread John Carmona
To all thanks I have got it now!!! JC ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] RGB, images

2005-05-10 Thread D. Hartley
> A shade of gray is made by having r == g == b. ... so this has nothing to do with masks and transparency? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] zip question

2005-05-10 Thread Goldie, Josh
A shade of gray is made by having r == g == b. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of D. Hartley Sent: Tuesday, May 10, 2005 4:46 PM Cc: tutor@python.org Subject: Re: [Tutor] zip question I tried to look at the image band by band, but got three

Re: [Tutor] [ANN] new version of rur-ple (0.8.5)

2005-05-10 Thread Andre Roberge
On 5/10/05, Bob Gailer <[EMAIL PROTECTED]> wrote: > At 08:48 PM 5/9/2005, André Roberge wrote: [snip] > On http://rur-ple.sourceforge.net/en/errors.htm Reeborg > appears as Egrebor. I assume that's incorrect. > > You are indeed correct. Thank you for pointing this out. Just for a histori

Re: [Tutor] zip question

2005-05-10 Thread D. Hartley
I tried to look at the image band by band, but got three grey-scale-looking images (for r, g, and b), and one white one. I have a feeling my clue lies in the latter, but am having a hard time finding examples of how to manipulate that part (trying hard to avoid a spoiler here!) in the documentatio

Re: [Tutor] zip question

2005-05-10 Thread R. Alan Monroe
> I need some pointers to solve number 7. For what I can see on that picture > the only hint is the gray line inside the .png drawing, but what can I do > with it? > Just tell me where to start and I will try to get from there Have you ever learnt about graphics and pixel colors? You know

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Roel Schroeven
John Carmona wrote: > This is what I did. I have tried the whole field, part of the URL (after the > .com), etc.. I Just get the old 404 not found message. You just need to apply it to the basename of the filename. -- If I have been able to see further, it was only because I stood on the shoul

Re: [Tutor] zip question

2005-05-10 Thread Alberto Troiano
Great!!!Keep it up!! Now you can help with number 7...I hope jejeje Hi everyone I need some pointers to solve number 7. For what I can see on that picture the only hint is the gray line inside the .png drawing, but what can I do with it? Just tel

Re: [Tutor] following the chain

2005-05-10 Thread Alan Gauld
> import urllib > name="some URL" > X = urllib.urlopen(name) > print X > > the output of X in very strange to me. I have include the exact output: >0x91068>> The message is the clue. urlopen returms a fileobject. So you treat X like an open file. You have to read() from it to get the data. Al

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Alan Gauld
> ???trans function. But now "apply it to the URL", I am lost again. Its not strictly accurate, it means apply it to a section of the address... Alan G. (I'm catching up! All the previous posts help of course :-) ___ Tutor maillist - Tutor@python.or

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread John Carmona
copied the URL, paste it in my script in Python and run it (once) did not get nowhere, then did it a second time, and again did not get nowhere. JC ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread John Carmona
This is what I did. I have tried the whole field, part of the URL (after the .com), etc.. I Just get the old 404 not found message. JC ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] following the chain

2005-05-10 Thread Roel Schroeven
Servando Garcia wrote: > Thanks to the many hints from the list I have made it to level four, of > the python challenges. Many thanks to all. > I truly have been looking for a solid example to follow on the use of > the URL module. I don't feel am using it correctly or I am not > understandi

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Roel Schroeven
Alan Gauld wrote: >>This matches '[A-Z]{3}[a-z]{1}[A-Z]{3}' 477 occurences... > > > Doesn't the {3} mean a minimum of 3? It's exactlu equivalent to [A-Z][A-Z][A-Z] > I may be wrong, its not a feature I use much but I thought there was a > gotcha with the {} notation that meant you had to provi

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Bob Gailer
At 10:52 AM 5/10/2005, John Carmona wrote: Hey Liam thanks again for the hint. I have finally managed to use the ???trans function. But now "apply it to the URL", I am lost again. (I did apply it to the URL-twice) but nope, nothing is happening. One more hint if possible. How did you apply the

Re: [Tutor] following the chain

2005-05-10 Thread Goldie, Josh
Try: print X.readline() -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Servando Garcia Sent: Tuesday, May 10, 2005 2:37 PM To: Python help Subject: [Tutor] following the chain Thanks to the many hints from the list I have made it to level four, of the py

[Tutor] following the chain

2005-05-10 Thread Servando Garcia
Thanks to the many hints from the list I have made it to level four, of the python challenges. Many thanks to all. I truly have been looking for a solid example to follow on the use of the URL module. I don't feel am using it correctly or I am not understanding/using the clue correctly. Here

Re: [Tutor] [ANN] new version of rur-ple (0.8.5)

2005-05-10 Thread Bob Gailer
At 10:34 AM 5/10/2005, Bob Gailer wrote: At 08:48 PM 5/9/2005, André Roberge wrote: Version 0.8.5 of rur-ple has been released. The web site has completely changed; it includes over 35 pages. http://rur-ple.sourceforge.net/ -- Learning to program computer shoul

Re: [Tutor] No Need To Press Enter

2005-05-10 Thread Joseph Quigley
Darn! I get this error: Traceback (most recent call last): File "C:/Python24/saved/tmp1.py", line 1, in -toplevel- if event.key == K_q: NameError: name 'event' is not defined Do I need to import something? @ Denise: I would like to the full code if you don't mind. Date: Wed, 4

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread John Carmona
Hey Liam thanks again for the hint. I have finally managed to use the ???trans function. But now "apply it to the URL", I am lost again. (I did apply it to the URL-twice) but nope, nothing is happening. One more hint if possible. Thanks JC ___ Tutor

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Alan Gauld
> This matches '[A-Z]{3}[a-z]{1}[A-Z]{3}' 477 occurences... Doesn't the {3} mean a minimum of 3? I may be wrong, its not a feature I use much but I thought there was a gotcha with the {} notation that meant you had to provide a terminating character too? Alan G. (Who has only just started on the

Re: [Tutor] [ANN] new version of rur-ple (0.8.5)

2005-05-10 Thread Bob Gailer
At 08:48 PM 5/9/2005, André Roberge wrote: Version 0.8.5 of rur-ple has been released. The web site has completely changed; it includes over 35 pages. http://rur-ple.sourceforge.net/ -- Learning to program computer should be fun, for adults and children alike

Re: [Tutor] output of dictionaries

2005-05-10 Thread Karl Pflästerer
On 10 Mai 2005, [EMAIL PROTECTED] wrote: > I'm creating a small database using a dictionary of dictionaries, and I > want to output it to a file. It seems that only strings can be output to > files, and I cannot quite figure out how to quickly and simply convert my > dictionary to a list of

Re: [Tutor] output of dictionaries

2005-05-10 Thread Gabriel Farrell
take a look at pickle and shelve. info about both can be found at http://docs.python.org/lib/python.html On Tue, May 10, 2005 at 08:46:50AM -0700, Tom Cloyd wrote: > I'm creating a small database using a dictionary of dictionaries, and I > want to output it to a file. It seems that only strings

Re: [Tutor] need a example of translate or maketrans

2005-05-10 Thread John Carmona
Terry, thanks very much that was very helpful right at this moment :) This is what beginners like me needs small example that explain very well how to use some of the functions. I found sometimes that the explanation on the book or the documentation going over my head because they don't show a

[Tutor] output of dictionaries

2005-05-10 Thread Tom Cloyd
I'm creating a small database using a dictionary of dictionaries, and I want to output it to a file. It seems that only strings can be output to files, and I cannot quite figure out how to quickly and simply convert my dictionary to a list of strings or whatever. Or maybe I'm going about this

Re: [Tutor] zip question

2005-05-10 Thread Alberto Troiano
The problem is that you have to get the content before you can get the filename or comment of the files. You have to do something like this import zipfile file=zipfile.ZipFile("yourfile.zip") f=file.getinfo(name_of_the_file_inside_yourfile.zip) And then you can take the comments and filenames y

Re: [Tutor] computer screen resolution

2005-05-10 Thread Kent Johnson
EUGENE ASTLEY wrote: > I would like to have a full screen for the game I have programmed > regardless of the computer users screen resolution. Is their a way from > Python or livewires that I can get the info from the computer and then > enter it into the global SCREEN_WIDTH and SCREEN_HEIGHT?

Re: [Tutor] [ANN] new version of rur-ple (0.8.5)

2005-05-10 Thread André Roberge
ZVision wrote: > Hi Roberge, > I wanted to give your program a try. > Absoluted beginner. But there dont seem to be enough instructions > about how to do this. Maybe I am missing something. No, you are quite right. At this stage of development, I still assume that someone with more experience th

Re: [Tutor] [ANN] new version of rur-ple (0.8.5)

2005-05-10 Thread ZVision
Hi Roberge, I wanted to give your program a try. Absoluted beginner. But there dont seem to be enough instructions about how to do this. Maybe I am missing something. I have py2.4 installed. I installed the wxPython, then I tried to run start.py from your program. Didnt work. So I opened python and

Re: [Tutor] computer screen resolution

2005-05-10 Thread Liam Clarke
Is Livewires a game development package? I'm pretty sure pygame can do what you want, it can handle OpenGL if you're into pain. www.pygame.org Plus, it plays MP3's and MPGs easily. :) Regards, Liam Clarke On 5/10/05, EUGENE ASTLEY <[EMAIL PROTECTED]> wrote: I would like to h

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Liam Clarke
Hi, So... the [^A-Z] limits the [A-Z]{3}?... /me picks at IDLE. Dang, it does. Thanks a bundle, Roel! And I learn a little more about regexes :Z Cheers, Liam Clarke On 5/10/05, Roel Schroeven <[EMAIL PROTECTED]> wrote: Liam Clarke wrote:> This matches '[A-Z]{3}[a-z]{1}[A-Z]{3}'  477 occ

Re: [Tutor] Any easy way to invoke the default browser on a specified URL?

2005-05-10 Thread Roel Schroeven
Kent Johnson wrote: > Terry Carroll wrote: > >>Is there any way, from within Python, to cause the default browser >>(Firefox, in my case) to be invoked with a specific URL? >> >>I'd like to do something like (totally made-up name and syntax): >> >>OpenBrowser("http://www.google.com/";) >> >>and

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Roel Schroeven
Liam Clarke wrote: > This matches '[A-Z]{3}[a-z]{1}[A-Z]{3}' 477 occurences... so I hope > that it's all the same letter. You have to many occurences because that regex matches XXXxXXX, but also XXxXX. You should only match exactly 3 guards on each side. IIRC I used something like (sa