Re: [Tutor] XML to Python

2005-05-06 Thread Gabriel Farrell
On Thu, 5 May 2005, Smith, Jeff wrote: > I'm able to use the built in XML parser to effect "normal" XML parsing > usage but frequently, I'm not doing anything to complicated and would > simply like to translate the XML file into a more "Pythonic" structure. > What's the best way to do this? Some

[Tutor] ANN: version 0.8 of RUR-PLE

2005-05-06 Thread André Roberge
For those interested in a different approach for learning to program using Python, I would be interested in your thoughts about RUR-PLE. The latest version (0.8) is available on sourceforge: https://sourceforge.net/project/showfiles.php?group_id=125834 Note that the home page for the project is

Re: [Tutor] XML to Python

2005-05-06 Thread Terry Carroll
On Thu, 5 May 2005, Smith, Jeff wrote: > I'm able to use the built in XML parser to effect "normal" XML parsing > usage but frequently, I'm not doing anything to complicated and would > simply like to translate the XML file into a more "Pythonic" structure. > What's the best way to do this? Som

Re: [Tutor] python challenges

2005-05-06 Thread Max Noel
On May 6, 2005, at 22:32, D. Hartley wrote: > Maybe that's my problem. I dont know how to save this particular file > onto my computer first. I can't 'reach' it from the url. It's not > like a picture I can right click on and save image, or something. My > first thought was i needed to use th

Re: [Tutor] python challenges

2005-05-06 Thread D. Hartley
Maybe that's my problem. I dont know how to save this particular file onto my computer first. I can't 'reach' it from the url. It's not like a picture I can right click on and save image, or something. My first thought was i needed to use the module to do that. but apparently i need to use the

Re: [Tutor] python challenges

2005-05-06 Thread Max Noel
On May 6, 2005, at 22:20, D. Hartley wrote: > Yes, I realized my original guess was wrong. I think I found the > target file but now none of the module commands I'm used to will do > anything useful on it. I'm just getting "file not found" errors and > the like. There's something in the big pictu

Re: [Tutor] python challenges

2005-05-06 Thread D. Hartley
Yes, I realized my original guess was wrong. I think I found the target file but now none of the module commands I'm used to will do anything useful on it. I'm just getting "file not found" errors and the like. There's something in the big picture that I'm not getting here, I think. All I know is

Re: [Tutor] python challenges

2005-05-06 Thread Max Noel
On May 6, 2005, at 21:57, Tim Peters wrote: > What do you have against PIL ? Nothing in particular, just no idea how to use it. > simple ways has been part of the fun for me. I don't know how you > solved level 7, Hint: it's a stupid and inelegant method involving a certain progra

Re: [Tutor] python challenges

2005-05-06 Thread Max Noel
On May 6, 2005, at 21:40, D. Hartley wrote: > I figured out what module you're supposed to use for 5, and the thing > that kills me is it's a module I've actually *used* too! But I don't > know what to . man this is hard to say without using a spoiler. I > dont know what particular thing to a

[Tutor] please disregard last mssg @ function problem

2005-05-06 Thread D. Hartley
Did you ever send an email, and then as soon as you sent it, realize that you are in fact a colossal idiot and you already know the answer? Yes, I saw my typo. Heh. Nevermind...! *sweeps that email under the rug, hopefully unread* ~Denise ___ Tutor ma

Re: [Tutor] python challenges

2005-05-06 Thread Tim Peters
[Max Noel] ... > In fact, I am (and will probably give up) at number 9. I was > able to do #7 without using PIL, but it seems that it is once again > necessary for #9, and I'm not gonna be able to use a workaround this > time. What do you have against PIL ? Processing images has played no par

Re: [Tutor] Importing C,C++,Asm modules

2005-05-06 Thread Danny Yoo
On Wed, 4 May 2005, Ali Polatel wrote: > Dear friends, > Is there a way to import C,C++ or Asm modules to python scripts? > If yes how? Hi Ali, Python can be "extended" to use external libraries, as long as we can call them from C. There's a tutorial for C programmers here: h

Re: [Tutor] python challenges

2005-05-06 Thread D. Hartley
I figured out what module you're supposed to use for 5, and the thing that kills me is it's a module I've actually *used* too! But I don't know what to . man this is hard to say without using a spoiler. I dont know what particular thing to apply it to (and i tried to read it from the source cod

Re: [Tutor] function runs w/o error but produces no output (?) - possible spoiler

2005-05-06 Thread Marilyn Davis
On Fri, 6 May 2005, D. Hartley wrote: > Hey guys, > > I wrote the following function, and if I do it line-by-line in the > interpreter, each line works exactly as it should. However, when I > run the function by its name, nothing happens. It doesnt print the > print statement, it doesnt give me

Re: [Tutor] python challenges

2005-05-06 Thread Max Noel
On May 6, 2005, at 21:06, Alberto Troiano wrote: > Hey > > I'm stucked in number 5 > It says pronounce it and there is nothing else not in page nor in > the source > code > What can I do?? Well... Go ahead and pronounce it (the title of the page, that is)... Sounds awfully close to a ce

Re: [Tutor] python challenges

2005-05-06 Thread Alberto Troiano
Hey I'm stucked in number 5 It says pronounce it and there is nothing else not in page nor in the source code What can I do?? I know someone is at 7 now What's this riddler about??? regards Alberto >From: Danny Yoo <[EMAIL PROTECTED]> >To: Max Noel <[EMAIL PROTECTED]> >CC: Python tutor >Subje

Re: [Tutor] Basics

2005-05-06 Thread Danny Yoo
On Fri, 6 May 2005, Evi Wyns wrote: > I know this is probably too soon still. I am busy with classes at the > moment and I am having a difficult time understanding the use of > classes... do you have a good tutorial or good explanation for me how to > understand classes more better? Hi Evi, Yo

Re: [Tutor] python challenges

2005-05-06 Thread Danny Yoo
> > Anyone have a gentle hint, or pointer to another 'beginner' tutorial > > to regular expressions? > > > > Thanks! I dont want to get stuck here in the riddles! Yeah, there is also a great regular expression HOWTO here: http://www.amk.ca/python/howto/regex/ Best of wishes!

[Tutor] function runs w/o error but produces no output (?) - possible spoiler

2005-05-06 Thread D. Hartley
Hey guys, I wrote the following function, and if I do it line-by-line in the interpreter, each line works exactly as it should. However, when I run the function by its name, nothing happens. It doesnt print the print statement, it doesnt give me an error, it just goes to the next >>> line. This

Re: [Tutor] Text Directly to Screen?

2005-05-06 Thread Alan Gauld
> > What I want to do is output text *directly* to the screen. On Unix it is very platform specific. On a PC (including Linux) you could do it from assembler by writing direct to the screen memory map via the BIOS but that would probably break all the other stuff since the OS does a pile of ma

Re: [Tutor] Class and Scope Question

2005-05-06 Thread Tim Johnson
* Karl Pflästerer <[EMAIL PROTECTED]> [050506 10:40]: >Karl > -- > Please do *not* send copies of replies to me. > I read the list My Thanks to both Karl and Rich for help me to understand this problem. I also appreciate the documentation reference. cheers tim -- Tim Johnson <[EMAIL

[Tutor] Basics

2005-05-06 Thread Evi Wyns
I am studying the basics for programming in Python at the moment. I have been studying Python in that past too because I heard the language is really flexible and a great use for scripting too. I am working on OS's like Windows XP and Unix Open BSD at the moment and am trying to figure out what the

Re: [Tutor] Python challenges

2005-05-06 Thread Chris Smith
> >> Anyone have a gentle hint, or pointer to another 'beginner' tutorial >> to regular expressions? >> >> Thanks! I dont want to get stuck here in the riddles! >> > > How about counting how many times each character is used and look for > the ones that are used infrequently (like only once). Dict

Re: [Tutor] Python challenges

2005-05-06 Thread Chris Smith
On Thursday, May 5, 2005, at 19:33 America/Chicago, [EMAIL PROTECTED] wrote: > Anyone have a gentle hint, or pointer to another 'beginner' tutorial > to regular expressions? > > Thanks! I dont want to get stuck here in the riddles! > How about counting how many times each character is used and

Re: [Tutor] Smtp

2005-05-06 Thread Karl Pflästerer
On 6 Mai 2005, [EMAIL PROTECTED] wrote: >I tried to use the mailserver script in library reference to send > mails but it gives an error:The script and the error are below.Why > does it give this error?How can i fix? [...] > ERROR: > > Traceback (most recent call last): > File "D:\Python23\

Re: [Tutor] Class and Scope Question

2005-05-06 Thread Karl Pflästerer
On 6 Mai 2005, [EMAIL PROTECTED] wrote: > > The following test script is kind of got me baffled: >#!/usr/local/bin/python > class Eval: > def __getitem__(self,key): > return eval(key) >##def test(): >## i = 100 >## b = ["My", "name", "is", "Tim"] >## test = "this is number %(str(i)

Re: [Tutor] Class and Scope Question

2005-05-06 Thread Rich Krauter
Tim Johnson wrote: > The following test script is kind of got me baffled: > #!/usr/local/bin/python > class Eval: > def __getitem__(self,key): > return eval(key) > ##def test(): > ## i = 100 > ## b = ["My", "name", "is", "Tim"] > ## test = "this is number %(str(i))s for a test %(' '.

[Tutor] Smtp

2005-05-06 Thread Ali Polatel
Dear Friends, I tried to use the mailserver script in library reference to send mails but it gives an error:The script and the error are below.Why does it give this error?How can i fix? import smtplib def prompt(prompt): return raw_input(prompt).strip() fromaddr = prompt("From: ") to

Re: [Tutor] Text Directly to Screen?

2005-05-06 Thread Wolfram Kraus
Aaron Elbaz wrote: > Hi, > > My question has to do with outputting text. > > Normally, you ouput to a console or a gui...but for my task, a hack > might be needed.. > > What I want to do is output text *directly* to the screen. And if > possible, restrict the window area to specific dimensions (