[Tutor] computer screen resolution

2005-05-09 Thread EUGENE ASTLEY
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? Gene _

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Chris Smith
> Am I looking for something like this - > > XXXjXXX? or something like XjXX or XXjX? The former: 3 on each side. Exactly 3. BTW , you can check your understanding by saving the image you get from riddle 6, compressing it with zlib, filtering out all but string.letters and looking for the same

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

2005-05-09 Thread André Roberge
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. RUR-PLE is an environment designed to help

[Tutor] Fwd: zip question

2005-05-09 Thread Liam Clarke
Gack. List as well. -- Forwarded message --From: Liam Clarke <[EMAIL PROTECTED]>Date: May 10, 2005 2:37 PM Subject: Re: [Tutor] zip questionTo: "D. Hartley" <[EMAIL PROTECTED]>Hi,  Then I typed in a.filename, and it popped up "file.txt" right there in the interpreter window and I

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Liam Clarke
Hi all, > Hint: the hint on the screen says "exactly three."   -Arcege Hah, yeah, but it also says 'all sides' and that had me following a dead-end for awhile, and something in the challenge hint forums made me think it might be exactly three in total, but surrounding the lowercase letter. i.e

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread R. Alan Monroe
> Am I looking for something like this - > XXXjXXX? or something like XjXX or XXjX? I've also looked for - Take the challenge's hint a little more literally, it's quite specific. This one had me stumped for a little while until I realized my mistake. Alan

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Liam Clarke
Hmmm... the forums don't overly explain level 3. Am I looking for something like this - XXXjXXX? or something like XjXX or XXjX? I've also looked for - ooXXXoo XXXjXXXooXXXoo and oooXooo oooXooo oooXooo XXXjXXX oooXooo oooXooo oooXooo Argh. My head is going to explode. On 5/10/05, Roel S

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Liam Clarke
Yeah, I was going that way, got a half translation, saw the word 'trans' in the text, went from there. On 5/10/05, R. Alan Monroe <[EMAIL PROTECTED]> wrote: > Hi John, took me awhile to solve this one too, it's quite good, teaches you> about a part of Python that you wouldn't normally use.> Do you

Re: [Tutor] zip question

2005-05-09 Thread D. Hartley
Hey everyone - I finally got it. Just did a.filename, or a.comment or whatever. I think I was feeling like if it wasnt a method, I couldnt make it display. Then I typed in a.filename, and it popped up "file.txt" right there in the interpreter window and I felt like a big idiot. Why couldn't that

Re: [Tutor] zip question

2005-05-09 Thread jfouhy
Quoting "D. Hartley" <[EMAIL PROTECTED]>: > Instances have the following attributes: > > filename, comment, etc. > > > I've tried about ten things to get "filename" to work: > > myzip.filename("99905.txt") (str not callable) Check out the error message: "str not callable". You are trying to

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

2005-05-09 Thread Terry Carroll
On Mon, 9 May 2005, Kent Johnson wrote: > >>> import webbrowser > >>> webbrowser.open("http://www.google.com/";) Beautiful; just what I needed. Thanks. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

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

2005-05-09 Thread jfouhy
Quoting Terry Carroll <[EMAIL PROTECTED]>: > Is there any way, from within Python, to cause the default browser > (Firefox, in my case) to be invoked with a specific URL? If you're on Win32, try: >>> import win32api >>> win32api.ShellExecute(0, 'open', 'http://www.google.com/', None, '', 1) Pa

Re: [Tutor] zip question

2005-05-09 Thread Max Noel
On May 10, 2005, at 01:18, D. Hartley wrote: > I admitted that my grasp of classes (and "constructors") is a bit > fuzzy. I did get this particular class to work, and got the first half > of the problem done. However, now i'm working in another class, > zipinfo. It says: > > Instances of the Zip

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

2005-05-09 Thread Kent Johnson
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 have a new browser window

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

2005-05-09 Thread Terry Carroll
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 have a new browser window opened up pointing to Google. (Okay,

Re: [Tutor] zip question

2005-05-09 Thread D. Hartley
P.S. I realize that zipfile has commands, and zipinfo only seems to list "attributes." Each instance of ZipInfo is a collection of information about the file in the archive: its filename, its comments, etc. So filename is not filename() - it's not a callable command. But how can i access/see thi

[Tutor] zip question

2005-05-09 Thread D. Hartley
This is a problem I'm having with instances of classes and their objects. John suggested: > Look at the constructor :-) > > >>> import zipfile > >>> z = zipfile.ZipFile('myzip.zip') > >>> z.printdir() I admitted that my grasp of classes (and "constructors") is a bit fuzzy. I did get this particu

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

2005-05-09 Thread Terry Carroll
On Mon, 9 May 2005, Servando Garcia wrote: > As you can guess I am working on the riddles. I have looked in vain > for a simple example and or a explanation of the string function > "translate" or even "maketrans" >Can someone please send me a working example,please. Here's a quic

[Tutor] need a example of translate or maketrans

2005-05-09 Thread Servando Garcia
Hello list As you can guess I am working on the riddles. I have looked in vain for a simple example and or a explanation of the string function "translate" or even "maketrans" Can someone please send me a working example,please. thanks _

Re: [Tutor] Tutor Digest, Vol 15, Issue 21 (python.org: trusted sender for your account)

2005-05-09 Thread Chris Smith
On Monday, May 9, 2005, at 15:45 America/Chicago, [EMAIL PROTECTED] wrote: > Actually, perhaps this is something you guys would know about! In your > own learning python (or as you watched others learn, if you're one of > the resident experts), have you come across some good challenges for > pyt

Re: [Tutor] Python riddles - zip question

2005-05-09 Thread jfouhy
Quoting "D. Hartley" <[EMAIL PROTECTED]>: > How do I open a zipfile? I see commands for closing it, but i only see > "class zipfile" - no command like urlopen() (!!!) Look at the constructor :-) >>> import zipfile >>> z = zipfile.ZipFile('myzip.zip') >>> z.printdir() ... -- John.

Re: [Tutor] challenges - general

2005-05-09 Thread Alan Gauld
> So if anyone has a source of other challenges, I would > really love to see them. The ACM has a set of computing challenges. They are mainly math based though so you might not like them. There are those plus many others on the Useless Python web site - Recently relaunched - and go to the old sit

[Tutor] Python riddles - zip question

2005-05-09 Thread D. Hartley
How do I open a zipfile? I see commands for closing it, but i only see "class zipfile" - no command like urlopen() (!!!) Thanks! -- Forwarded message -- From: Roel Schroeven <[EMAIL PROTECTED]> Date: May 9, 2005 1:31 PM Subject: Re: [Tutor] Fwd: Fwd: Python riddles To: tutor@pytho

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread R. Alan Monroe
> Hi John, took me awhile to solve this one too, it's quite good, teaches you > about a part of Python that you wouldn't normally use. > Do you want hints or spoilers? > I've give hints for now, search the Python docus for 'trans', check the > string methods. You can also do it with a convolut

Re: [Tutor] challenges - general

2005-05-09 Thread Kent Johnson
D. Hartley wrote: > Actually, perhaps this is something you guys would know about! In your > own learning python (or as you watched others learn, if you're one of > the resident experts), have you come across some good challenges for > python learners? The questions on this mailing list are often

Re: [Tutor] scoping oddity

2005-05-09 Thread Alan Gauld
> Obviously, you can't put every variable on the 'def' line. Obviously. Or at least maybe not. If your program is well designed its unusual to have more that a few global varoables so you could in fact pass them in to each fuinctrion - but thats bad practice too. You shouldn't ever have to. If yo

Re: [Tutor] No Need to Press Enter

2005-05-09 Thread Alan Gauld
> yes. That's exactly what I was looking for. Do you know the code for > the ^Q ^Z (control + letter keys) to quit? Like ^Z to quit the Python shell? Be careful with that one. The ^Z only works on Windows. On Linux or MacOS its ^D. In both cases its the end of file character used by the operat

Re: [Tutor] Fwd: Fwd: Python riddles

2005-05-09 Thread Roel Schroeven
Alberto Troiano wrote: > Now I'm stucked in the riddle 6 > > As I understand I have to find a secret file (which I have but inside there > is like 900 files) > and do something with it One of the files has a name that is unlike all the other ones; take a look at that one. > Is it like number

Re: [Tutor] challenges - general

2005-05-09 Thread Alberto Troiano
Hey I have recently got stuck (jejeje) on riddle 7 Yes I managed to solve riddle 6 after hours of struggle with the riddle Now I don't know what to do because there is no hint anywhere Regarding to Denise I would say don't give up, I didn't know anything that helped to so

[Tutor] challenges - general

2005-05-09 Thread D. Hartley
Hello, everyone! Well after hours of struggle, I finally managed to get the peak riddle solved. Very frustrating, but I think I learned a lot. However on the channel one - I cant get any ideas. It may just be best for me to bow out at this point. One of my biggest problems has been that not onl

Re: [Tutor] How do I squish this bug?

2005-05-09 Thread Max Noel
On May 9, 2005, at 17:57, Joseph Quigley wrote: > Why do I get the error: >NameError: global name 'main' is not defined > > when switching between the two module twice (ie: type: jargon > type:back() > type:jargontype:back() )? > > Thanks > JQ > Namespaces. Each module has

Re: [Tutor] Generator function question?

2005-05-09 Thread Blake Winton
Sorry for jumping in to this a little late, but... > This is (IMO) more elegant: > def neverEndingStatus(): > index = 0 > statusChars = ['|', '\\', '-', '/'] > while True: > yield statusChars[index] > index = (index + 1) % 4 Why not go a step further? def neverEn

[Tutor] How do I squish this bug?

2005-05-09 Thread Joseph Quigley
Traceback (most recent call last): File "C:\Python24\saved\Geek Dictionary\jargon_file.py", line 39, in -toplevel- main() File "C:\Python24\saved\Geek Dictionary\jargon_file.py", line 26, in main lobby.lobby() File "C:/Python24/saved/Geek Dictionary\lobby.py", line 51, in lobby

Re: [Tutor] Fwd: Fwd: Python riddles

2005-05-09 Thread Alberto Troiano
Thanks I got itfinally Now I'm stucked in the riddle 6 As I understand I have to find a secret file (which I have but inside there is like 900 files) and do something with it Can someone give a hint?? Is it like number 4?the one with urllib??? thanks Alberto >From: "

Re: [Tutor] Tutor Digest, Vol 15, Issue 19

2005-05-09 Thread jsoares
I was pleasantly surprised with the Dr. Python editor. Great for Python beginners like me. Also, this editor seems to support the wxWidgets and wxPython bindings library, which I'm trying to learn. John Soares [EMAIL PROTECTED] ___ Tutor maillist - Tut

Re: [Tutor] No Need to Press Enter

2005-05-09 Thread Joseph Quigley
yes. That's exactly what I was looking for. Do you know the code for the ^Q  ^Z (control + letter keys) to quit? Like  ^Z to quit the Python shell? At 06:03 PM 5/4/2005, you wrote: Message: 8 Date: Wed, 4 May 2005 11:33:53 -0700 From: "D. Hartley" <[EMAIL PROTECTED]> Subject: [Tutor] Fwd:  No Ne

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Roel Schroeven
John Carmona wrote: > OK I am stuck on this one. I see what I need to do (correct me if I am > wrong). But I need to write a script that will replace each letter by > another one (In this case a --> c etc.). I look at String, List and > Dictionary. I thought I could use the text.replace option

Re: [Tutor] scoping oddity

2005-05-09 Thread Michael . Coll-Barth
Ziyad, Thanks for the tip. Much of the code written here in my office, do exactly what you describe. The code I am working on is purely personal and educational. I guess I got sloppy, which in a way is educational. All, Obviously, you can't put every variable on the 'def' line. Is there a

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread John Carmona
Thanks Liam, I will start checking this afternoon. Regards JC ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Liam Clarke
Hi John, took me awhile to solve this one too, it's quite good, teaches you about a part of Python that you wouldn't normally use. Do you want hints or spoilers? I've give hints for now, search the Python docus for 'trans', check the string methods. Hope that didn't make it too obvious. Now, if

[Tutor] Python Challenge - Riddle 2

2005-05-09 Thread John Carmona
OK I am stuck on this one. I see what I need to do (correct me if I am wrong). But I need to write a script that will replace each letter by another one (In this case a --> c etc.). I look at String, List and Dictionary. I thought I could use the text.replace option but I am not sure. Anybody t