Re: [Tutor] My First Program

2005-12-09 Thread Danny Yoo
> def quiz_question(some_question, some_right_answer): > question = raw_input(some_question) > if question == some_right_answer: > print "Yes!\n" > else: > print "Wrong\n" > > quiz_question("Name the capital of NC? ", "Raleigh") > quiz_question("Name t

Re: [Tutor] My First Program

2005-12-09 Thread Trent Rigsbee
Here's my new and improved program: def quiz_question(some_question, some_right_answer): question = raw_input(some_question) if question == some_right_answer: print "Yes!\n" else: print "Wrong\n" quiz_question("Name the capital of NC? ", "Ra

Re: [Tutor] Can I get some feedback on my currency converter program

2005-12-09 Thread Alan Gauld
> like in Java, i would like to have live currency quotes fed to my > function, Look at the urllib module. However I suspect you might be better working on the basics for a little longer before getting too ambitious! def rupees_from_dollars(d_doll): return 43*(d_doll) You don;t need the ()

Re: [Tutor] how to extract text by specifying an element usingElementTree

2005-12-09 Thread Alan Gauld
> is there a way to get rid of '\n' and '\t' characters > from xml files easily. You can read the entire file as a string then apply standard string replace functionality to substitute an empty string.. HTH, Alan G Author of the learn to program web tutor http://www.freenetpages.co.uk/hp/alan.

Re: [Tutor] Can I get some feedback on my currency converter program

2005-12-09 Thread Danny Yoo
> On Fri, 9 Dec 2005, vikas mohan wrote: > > > Thanks! Looks in a better shape now! I have a diffrent question now: > > What if like in Java, i would like to have live currency quotes fed to > > my function, from some forex dealer website? So, that my program can > > provide uptodate info. How ca

Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-09 Thread Kent Johnson
Srinivas Iyyer wrote: > Hi group, > I just have another question in parsin XML files. I > found it very easy to parse XML files with kent and > danny's help. > > I realized that all my XML files have '\t' and '\n' > and whitespace. these extra features are making to > extract the text data fro

Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-09 Thread Srinivas Iyyer
Hi group, I just have another question in parsin XML files. I found it very easy to parse XML files with kent and danny's help. I realized that all my XML files have '\t' and '\n' and whitespace. these extra features are making to extract the text data from the xml files very difficult. I can

Re: [Tutor] Can I get some feedback on my currency converter program

2005-12-09 Thread Danny Yoo
On Fri, 9 Dec 2005, vikas mohan wrote: > Thanks! Looks in a better shape now! I have a diffrent question now: > What if like in Java, i would like to have live currency quotes fed to > my function, from some forex dealer website? So, that my program can > provide uptodate info. How can I hot/liv

Re: [Tutor] Can I get some feedback on my currency converter program

2005-12-09 Thread vikas mohan
Thanks! Looks in a better shape now! I have a diffrent question now: What if like in Java, i would like to have live currency quotes fed to my function, from some forex dealer website? So, that my program can provide uptodate info. How can I hot/live link my function?   /VikasM   #converts currenc

[Tutor] Can I get some feedback on my currency converter program

2005-12-09 Thread vikas mohan
Hi all, this is my first program in python.   It's a currency converter mini-program, but I am not getting the desired output. What wrong am I doing here?   Program code:   #converts currencies to Indian rupees def print_options():    print "Options:"    print " 'p' print options"    print " 'c' c

Re: [Tutor] Can I get some feedback on my currency converter program

2005-12-09 Thread Ewald Ertl
Hi! vikas mohan wrote: > Hi all, this is my first program in python. > > It's a currency converter mini-program, but I am not getting the desired > output. What wrong am I doing here? > > *Program code:* > > #converts currencies to Indian rupees > > def print_options(): > print "Options

[Tutor] XSLT module

2005-12-09 Thread Jan Eden
Hi, I intend to use an XSLT processor, and found various modules (4suite, Sab-Pyth) on the web. Could anyone recommend a specific module for transforming XML files? Thanks, Jan -- It's overkill, of course. But you can never have too much overkill. __