Re: [Tutor] printing in python 3.x

2010-12-03 Thread Alan Gauld
"Rance Hall" wrote But shop owner wants to do something nicer with the customer receipts. He is talking shop logos and pdf files. The simplest technique is probably to generate an HTML file and then get the OS to print that for you via the default browser. Google keeps bringing up Report

[Tutor] Question on tkinter event binding

2010-12-03 Thread Albert-Jan Roskam
Hi, I'm trying to make a small improvement on a data entry program and it is literally giving me a headache. I would appreciate your help or suggestions. The actual program uses Autocomplete entry widgets [1], which is a subclass of the Tkinter Entry widget. The sample code below uses a simpl

[Tutor] Finally finished my currency exchange program

2010-12-03 Thread Eddie
I've finally finished my currency exchange program thanks to help from this list and another list. It updates the exchange rates via an xml feed etc. Feedback on it would be appreciated please: http://www.dinksoftware.com/astute_currency_analyzer.php Dink

Re: [Tutor] Finally finished my currency exchange program

2010-12-03 Thread danielle davout
sadly you didn't take into account Linux users On 12/3/10, Eddie wrote: > I've finally finished my currency exchange program thanks to help from this > list and another list. It updates the exchange rates via an xml feed etc. > > Feedback on it would be appreciated please: > http://www.dinksoftw

Re: [Tutor] Finally finished my currency exchange program

2010-12-03 Thread Alan Gauld
"Eddie" wrote in message news:aanlktimxrajnbvj9egx4diqbwrb1ltfa9quv2fdeq...@mail.gmail.com... I've finally finished my currency exchange program thanks to help from this list and another list. It updates the exchange rates via an xml feed etc. If you wrote it in Python why only Windows sup

Re: [Tutor] Finally finished my currency exchange program

2010-12-03 Thread Joel Goldstick
On Fri, Dec 3, 2010 at 8:07 AM, Alan Gauld wrote: > > "Eddie" wrote in message > news:aanlktimxrajnbvj9egx4diqbwrb1ltfa9quv2fdeq...@mail.gmail.com... > > I've finally finished my currency exchange program thanks to help from >> this >> list and another list. It updates the exchange rates via an

Re: [Tutor] Finally finished my currency exchange program

2010-12-03 Thread Evans Anyokwu
I didn't find any of his previous questions as well - Looks like he just registered on this list to try and promote his product. Sneaky! On Fri, Dec 3, 2010 at 2:21 PM, Joel Goldstick wrote: > > On Fri, Dec 3, 2010 at 8:07 AM, Alan Gauld wrote: > >> >> "Eddie" wrote in message >> news:aanlktim

Re: [Tutor] permutations?

2010-12-03 Thread Alex Hall
Thanks, everyone! While I do not understand the function provided a few messages back, it works perfectly. The rest of the responses were very interesting. I need to try, yet again, to really understand list comprehensions, possibly the most difficult topic I have yet come across, along with the co

[Tutor] floats

2010-12-03 Thread Christopher Spears
I have a float variable that is very long. >>> float_a = 1.16667 However, I want to pass the value of float_a to float_b, but I want the float to be accurate to two decimal points. >>> float_a = 1.16667 >>> print "%.2f" % float_a 1.17 I tried the following: >>> float_b = "%.2f" % float_a >>>

Re: [Tutor] floats

2010-12-03 Thread Nitin Pawar
you have two options 1) either type cast like float_b = float(etcetc) 2) use round method which available inbuilt On Sat, Dec 4, 2010 at 12:22 AM, Christopher Spears wrote: > > I have a float variable that is very long. > > >>> float_a = 1.16667 > > However, I want to pass the value of float_a to

Re: [Tutor] floats

2010-12-03 Thread Corey Richardson
On 12/3/2010 1:52 PM, Christopher Spears wrote: I have a float variable that is very long. float_a = 1.16667 However, I want to pass the value of float_a to float_b, but I want the float to be accurate to two decimal points. float_a = 1.16667 print "%.2f" % float_a 1.17 I tried the foll

Re: [Tutor] floats

2010-12-03 Thread Emile van Sebille
On 12/3/2010 10:52 AM Christopher Spears said... I have a float variable that is very long. float_a = 1.16667 However, I want to pass the value of float_a to float_b, but I want the float to be accurate to two decimal points. float_a = 1.16667 print "%.2f" % float_a 1.17 I tried the fol

Re: [Tutor] floats

2010-12-03 Thread Jerry Hill
On Fri, Dec 3, 2010 at 1:52 PM, Christopher Spears wrote: float_a = 1.16667 > > However, I want to pass the value of float_a to float_b, but I want the float > to be accurate to two decimal points. Use the built-in round() function, like this: >>> a = 1.16667 >>> print a 1.16667 >>> b = ro

Re: [Tutor] floats

2010-12-03 Thread Alan Gauld
"Christopher Spears" wrote I have a float variable that is very long. float_a = 1.16667 Thats not really very long! However, I want to pass the value of float_a to float_b, but I want the float to be accurate to two decimal points. float_a = 1.16667 print "%.2f" % float_a 1.17 Round

Re: [Tutor] floats

2010-12-03 Thread Joel Goldstick
On Fri, Dec 3, 2010 at 1:52 PM, Christopher Spears wrote: > > I have a float variable that is very long. > > >>> float_a = 1.16667 > > However, I want to pass the value of float_a to float_b, but I want the > float to be accurate to two decimal points. > > >>> float_a = 1.16667 > >>> print "%.2f"

Re: [Tutor] Question on tkinter event binding

2010-12-03 Thread Albert-Jan Roskam
Aaahhh, got it! Peace! I did two things wrong: (1) I didn't use a tcl StringVar() to get the entry widget contents (2) I didn't consistently close the menus generated by previous attempts to run the program, which led to inconsistent results. I'll paste the working code below. It's partially i

Re: [Tutor] Question on tkinter event binding

2010-12-03 Thread Patty
Hello Albert-Jan: I am glad you made the comment below. I was fascinated with the fact that your code was partly in English/Python and also in Dutch. I am a linguist so have great interest in bilingualism. How does this work in practice? I mean as a programmer, with native language other tha

Re: [Tutor] Question on tkinter event binding

2010-12-03 Thread Terry Carroll
On Fri, 3 Dec 2010, Albert-Jan Roskam wrote: I'm trying to make a small improvement on a data entry program and it is literally giving me a headache. Followed shortly thereafter with: On Fri, 3 Dec 2010, Albert-Jan Roskam wrote: Aaahhh, got it! Peace! ... I'll paste the working code below. I

[Tutor] print problem

2010-12-03 Thread Hs Hs
hi I have a file and it is in chunks: I want to be able to select the number that follows 'Elution: ' where the line startswith (TITLE)(say 72.958) and check if it is larger than my choice of number (say 71.4). If it is then I want to print chunk from BEGIN LINE to END LINE separated by one empty

Re: [Tutor] Finally finished my currency exchange program

2010-12-03 Thread Eddie
Its Windows only as that is what I am more comfortable with and I don't use Linux (tried and not had much luck with it really). Yes, the installer is Windows only. Also, No, I didn't just register on thsi list, I've been registered on this list for years. Dink On 4 December 2010 01:54, Evans Any

Re: [Tutor] print problem

2010-12-03 Thread Walter Prins
Please post the exact contents of "test_script_test.py", don't paraphrase, don't abbreviate. A good place to post code snippets are here: http://pastebin.com/ That said, I'll try to put down some of the troubleshooting thought process you should be having. Firstly, the error message is telling yo

[Tutor] Newline

2010-12-03 Thread Ashley Blackwell
Hello everybody, I'm new to the mailing list so I'm pretty sure I'll have lots of questions:) It's a very basic question I have and everybody might look at this question and say, "Wow, she reallly doesn't get it?" But oh well. Here's my question: I'm in Chapter 2 of my Python Programming Third Edi

Re: [Tutor] Newline

2010-12-03 Thread Walter Prins
Hello Ava/Ashley On 4 December 2010 01:47, Ashley Blackwell wrote: > Exactly what is a newline character? Not all characters used to encode information are printable/displayable characters like the letters in the alphabet or numerals or punctuation and symbols. There's several "special" chara

Re: [Tutor] Newline

2010-12-03 Thread Rance Hall
Ava: On an old typewriter when you slapped that mechanical arm two separate but related things happened. 1) the page advanced to the next line of text. 2) the carriage was returnedt to the beginning of the line of text. If you were careful about the way you slapped that mechanical arm, you could

Re: [Tutor] Newline

2010-12-03 Thread Alex Hall
On 12/3/10, Ashley Blackwell wrote: > Hello everybody, I'm new to the mailing list so I'm pretty sure I'll have > lots of questions:) That is what the list is for. :) > > It's a very basic question I have and everybody might look at this > question and say, "Wow, she reallly doesn't get it?" But o

Re: [Tutor] Newline

2010-12-03 Thread Steven D'Aprano
Ashley Blackwell wrote: Hello everybody, I'm new to the mailing list so I'm pretty sure I'll have lots of questions:) It's a very basic question I have and everybody might look at this question and say, "Wow, she reallly doesn't get it?" But oh well. Here's my question: I'm in Chapter 2 of my Py

Re: [Tutor] Newline

2010-12-03 Thread Hugo Arts
On Sat, Dec 4, 2010 at 3:04 AM, Rance Hall wrote: > Ava: > > On an old typewriter when you slapped that mechanical arm two separate > but related things happened. > > 1) the page advanced to the next line of text. > 2) the carriage was returnedt to the beginning of the line of text. > > If you wer

Re: [Tutor] print problem

2010-12-03 Thread Steven D'Aprano
Hs Hs wrote: hi I have a file and it is in chunks: I want to be able to select the number that follows 'Elution: ' where the line startswith (TITLE)(say 72.958) and check if it is larger than my choice of number (say 71.4). If it is then I want to print chunk from BEGIN LINE to END LINE separa

[Tutor] Need Help!

2010-12-03 Thread tgreen673
Hello I am totally new to python and our last assignment is that we have to create a Gui Application game similar to Hangman. The game allows the user to guess a movie title from hints and allows the player to also guess a letter in the title. Right now I just have the GUI set up. Whatever

Re: [Tutor] Need Help!

2010-12-03 Thread Hugo Arts
On Sat, Dec 4, 2010 at 7:08 AM, wrote: > > Hello I am totally new to python and our last assignment is that we have to > create a Gui Application game similar to Hangman. The game allows the user > to guess a movie title from hints and allows the player to also guess a > letter in the title. Righ

Re: [Tutor] Need Help!

2010-12-03 Thread Steven D'Aprano
tgreen...@aol.com wrote: Hello I am totally new to python and our last assignment is that we have to create a Gui Application game similar to Hangman. The game allows the user to guess a movie title from hints and allows the player to also guess a letter in the title. Right now I just have

[Tutor] Question about the "main" Python help list

2010-12-03 Thread Joel Schwartz
I just went to sign up for the main Python help list and discovered that it is a "closed" list, in the sense that the answers to queries are kept private between the questioner and the helpers, rather than shared with everyone on the list. My question: Is there a general Python help list that is o

Re: [Tutor] Question about the "main" Python help list

2010-12-03 Thread Stefan Behnel
Joel Schwartz, 04.12.2010 08:19: I just went to sign up for the main Python help list and discovered that it is a "closed" list What (and where) is the "main Python help list"? Stefan ___ Tutor maillist - Tutor@python.org To unsubscribe or change