[Tutor] How to make to exit the loop, while typing Enter

2006-01-03 Thread John Joseph
Hi I am trying to write a program in which it ask for entries for the list , But if I press Enter it should exit the while loop without giving errors ,I have problem in making it work , right now if I press enter to exit , the program terminates showing error I am added my script

Re: [Tutor] Help with choosing books

2006-01-03 Thread Srinivas Iyyer
Hi, I guess this has been discussed in detail in December 2005 (last month). you might want to check this thread and the replies in deteails. http://mail.python.org/pipermail/tutor/2005-December/044028.html This might help. --- wood yee [EMAIL PROTECTED] wrote:

Re: [Tutor] How to make to exit the loop, while typing Enter

2006-01-03 Thread Danny Yoo
I am trying to write a program in which it ask for entries for the list , But if I press Enter it should exit the while loop without giving errors Hi John, Do you have ideas why it's getting an error? Can you point at the part of the program that's receiving the Enter? As a related

[Tutor] How to make to exit the loop, while typing Enter

2006-01-03 Thread Adam
Woops, forgot to reply-all.-- Forwarded message --From: Adam [EMAIL PROTECTED]Date: 03-Jan-2006 15:48 Subject: Re: [Tutor] How to make to exit the loop, while typing EnterTo: John Joseph [EMAIL PROTECTED] array = []m = 0print Enterto exitm = int(raw_input(Enter theValues forThe

[Tutor] Python code pretty-print?

2006-01-03 Thread Lance E Sloan
A colleague of mine often develops Python code under Mac OS X. He would like to be able to print the code in an easily readable format. He's found that kwrite on Linux does a very nice job, but it's inconvenient to copy his code to a Linux box just to print it out. We've found mention

[Tutor] dynamic lists

2006-01-03 Thread lfiedor
Hi im looking for very simple DES and RSA algorithms writen in python (or C), can anyone know where i can find them ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python code pretty-print?

2006-01-03 Thread Danny Yoo
On Tue, 3 Jan 2006, Lance E Sloan wrote: A colleague of mine often develops Python code under Mac OS X. He would like to be able to print the code in an easily readable format. He's found that kwrite on Linux does a very nice job, but it's inconvenient to copy his code to a Linux box just

Re: [Tutor] dynamic lists

2006-01-03 Thread Jason Massey
googled for rsa python: http://www.python.org/workshops/1995-05/pct.html On 1/3/06, lfiedor [EMAIL PROTECTED] wrote: Hiim looking for very simple DES and RSA algorithms writen in python (orC), can anyone know where i can find them___Tutor maillist-

[Tutor] DES and RSA cryptography algorithms? (Was: Re: dynamic lists)

2006-01-03 Thread Danny Yoo
On Tue, 3 Jan 2006, lfiedor wrote: im looking for very simple DES and RSA algorithms writen in python (or C), can anyone know where i can find them I'm changing subject lines. Please try to make your message Subject lines descriptive enough to make it easier to find later. Also, next time,

[Tutor] Syntax Errors

2006-01-03 Thread Jason Massey
I've just finished ripping out a bunch of lines in one of my wxPython programs. Testing it out I get: C:\Python24tla2.py File C:\Python24\tla2.py, line 412 self.grid.SetCellValue(0,0,Site) ^ SyntaxError: invalid syntax There's nothing wrong with that line. I didn't even touch it in the

[Tutor] HD/DVD/CD

2006-01-03 Thread Ron Speerstra
Hi, M-list, my name Ron Speerstra(the Netherlands) my question: howtoo read the HD/CD/DVD serial-numbers with Python. Volume-name, dir name, file name. no problem etc. Gr Ron$ _ Vind alles terug op je PC: MSN Search Toolbar

Re: [Tutor] How to make to exit the loop, while typing Enter

2006-01-03 Thread Alan Gauld
entries for the list , But if I press Enter it should exit the while loop without giving errors ,I have problem in making it work , right now if I press enter to exit , the program terminates showing error Thats because you can't convert an empty string to an int. If you defer the

Re: [Tutor] Help with choosing books

2006-01-03 Thread Alan Gauld
Hi, What background do you come from? Can you already program in another language? Hi! I got Foundations of Python Network Programming I really want to tackle my Foundations book and I want to get up to speed as quickly as I can. Thanks! If you already program then just work through the

Re: [Tutor] Syntax Errors

2006-01-03 Thread Danny Yoo
On Tue, 3 Jan 2006, Jason Massey wrote: I've just finished ripping out a bunch of lines in one of my wxPython programs. Testing it out I get: C:\Python24tla2.py File C:\Python24\tla2.py, line 412 self.grid.SetCellValue(0,0,Site) ^ SyntaxError: invalid syntax There's nothing

Re: [Tutor] HD/DVD/CD

2006-01-03 Thread John Fouhy
On 04/01/06, Ron Speerstra [EMAIL PROTECTED] wrote: my question: howtoo read the HD/CD/DVD serial-numbers with Python. Volume-name, dir name, file name. no problem etc Are you running Microsoft Windows? If so, are any of the scripts at

Re: [Tutor] Syntax Errors

2006-01-03 Thread Jason Massey
Danny! Thanks! It's the tab vs spaces, alright. I use tabs for my spacing and I was touching a part of the code that a co-worker wrote. Guess what he uses? Spaces. Thanks for that insight and I'll be sure to read up on the command line options. On 1/3/06, Danny Yoo [EMAIL PROTECTED] wrote: On

Re: [Tutor] dynamic lists

2006-01-03 Thread Alan Gauld
im looking for very simple DES and RSA algorithms writen in python (or C), can anyone know where i can find them I'll be slightly surprised if you find Python versions(but not amazed! :-) since performance is usually of high priority for cryptography. But the RSA site should have C libraries

Re: [Tutor] Python code pretty-print?

2006-01-03 Thread Alan Gauld
Try getting gvim for MacOS vim includes a Python mode with syntax colouring and you can get it to print it out using an HTML representation. It works well IMHO (on any platform including MacOS). http://www.vim.org/download.php and MacOS specific versions : http://macvim.org/ Scite does the

Re: [Tutor] dynamic lists

2006-01-03 Thread Alan Gauld
im looking for very simple DES and RSA algorithms writen in python (or C), can anyone know where i can find them I'll be slightly surprised if you find Python versions(but not amazed! :-) since performance is usually of high priority for cryptography. Ok, I'm duly surprised but not

Re: [Tutor] HD/DVD/CD

2006-01-03 Thread Terry Carroll
On Tue, 3 Jan 2006, Ron Speerstra wrote: my question: howtoo read the HD/CD/DVD serial-numbers with Python. I can take you part-way there, at least under Windows. Hopefully someone can finish the job. I'm assuming you want the same serial # that shows up when you do a DIR on the CD, e.g.:

Re: [Tutor] HD/DVD/CD

2006-01-03 Thread John Fouhy
On 04/01/06, Terry Carroll [EMAIL PROTECTED] wrote: I hope someone more artful than I can show a quick and easy way to convert either '758C87F3' or -1972144115 to the '8A73780D' that is your goal. Hmm, well, i = -1972144115 '%X' % (pow(2, 32)-(~i+1)) '8A73780D' Although my bitwise

Re: [Tutor] HD/DVD/CD

2006-01-03 Thread Terry Carroll
On Wed, 4 Jan 2006, John Fouhy wrote: On 04/01/06, Terry Carroll [EMAIL PROTECTED] wrote: I hope someone more artful than I can show a quick and easy way to convert either '758C87F3' or -1972144115 to the '8A73780D' that is your goal. Hmm, well, i = -1972144115 '%X' % (pow(2,

[Tutor] Programming Python, 3rd ed.??

2006-01-03 Thread Dick Moores
Several months ago I saw an item on the O'Reilly site to the effect that the 3rd. ed. of Programming Python was in the works. I made a note to myself to check back in January. I just did, but could find nothing at all about a 3rd. edition. Anyone know? Thanks, Dick Moores

Re: [Tutor] How to make to exit the loop, while typing Enter

2006-01-03 Thread John Joseph
Hi All I was able to exit the while loop , using sys module also I was able to find the maximum no of marks entered , I am adding my code , for comments and suggestions Thanks for the support Joseph John