[Tutor] Raw string form variable

2013-05-05 Thread Ajin Abraham
Please refer this paste: http://bpaste.net/show/vsTXLEjwTLrWjjnfmmKn/ and suggest me the possible solutions. Regards, Ajin Abraham ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] Raw string form variable

2013-05-05 Thread Peter Otten
Ajin Abraham wrote: Please refer this paste: http://bpaste.net/show/vsTXLEjwTLrWjjnfmmKn/ and suggest me the possible solutions. Regards, Quoting the paste: i am executing these in Python 2.7 interpreter import os os.path.join(r'C:\win\apple.exe') #will returns me = 'C:\\win\\apple.exe'

Re: [Tutor] Raw string form variable

2013-05-05 Thread Steven D'Aprano
On 05/05/13 18:00, Ajin Abraham wrote: Please refer this paste: http://bpaste.net/show/vsTXLEjwTLrWjjnfmmKn/ and suggest me the possible solutions. There is no need for a paste bin for this. In six months time, when other people are searching the mail archives looking for answers, the paste

[Tutor] Using graphics

2013-05-05 Thread Stafford Baines
I have just finished Python Programming by Michael Dawson. A wonderful book with downloadable examples. However, after many hours of frustrating attempts I can't get the graphics to work. I get error messages such as 'no module called python.image' I have made sure that the folder Livewires

Re: [Tutor] Using graphics

2013-05-05 Thread Dave Angel
On 05/05/2013 07:49 AM, Stafford Baines wrote: I have just finished Python Programming by Michael Dawson. A wonderful book with downloadable examples. However, after many hours of frustrating attempts I can't get the graphics to work. I get error messages such as 'no module called

[Tutor] stumped by what looks like recursive list comprehension

2013-05-05 Thread Jim Mooney
I looked up list comprehension after the last explanation and it's really cool. But the example below stumps me. I understand the second part, primes = but the first part, noprimes = baffles me since it swaps i and j back and forth in what looks like a circle ;') Also, the other examples I looked

Re: [Tutor] stumped by what looks like recursive list comprehension

2013-05-05 Thread Steven D'Aprano
On 06/05/13 02:56, Jim Mooney wrote: I looked up list comprehension after the last explanation and it's really cool. But the example below stumps me. I understand the second part, primes = but the first part, noprimes = baffles me since it swaps i and j back and forth in what looks like a circle

Re: [Tutor] stumped by what looks like recursive list comprehension

2013-05-05 Thread Zachary Ware
On Sun, May 5, 2013 at 11:56 AM, Jim Mooney cybervigila...@gmail.com wrote: I looked up list comprehension after the last explanation and it's really cool. But the example below stumps me. I understand the second part, primes = but the first part, noprimes = baffles me since it swaps i and j

Re: [Tutor] Using graphics

2013-05-05 Thread boB Stepp
On Sun, May 5, 2013 at 6:49 AM, Stafford Baines staffordbai...@yahoo.com wrote: I have just finished Python Programming by Michael Dawson. A wonderful book with downloadable examples. However, after many hours of frustrating attempts I can't get the graphics to work. I own this book, too,

[Tutor] Clear screen questions

2013-05-05 Thread boB Stepp
I have been playing around with my own version of a guess the number game that I wrote before looking at how the kids' book (which I am reviewing for my kids) did it. For some reason my children are fascinated by this game and keep asking me for improvements. The latest one was to implement an

Re: [Tutor] Clear screen questions

2013-05-05 Thread Steven D'Aprano
On 06/05/13 10:17, boB Stepp wrote: I have been playing around with my own version of a guess the number game that I wrote before looking at how the kids' book (which I am reviewing for my kids) did it. For some reason my children are fascinated by this game and keep asking me for improvements.

Re: [Tutor] Using graphics

2013-05-05 Thread Dave Angel
Please reply to the list, not to an individual, unless the response is personal, or something like a thank-you. Also, please put your response *after* whatever you're quoting, and use the feature in your mail that uses the carets to mark quoted portions. On 05/05/2013 09:17 AM, Stafford

Re: [Tutor] Clear screen questions

2013-05-05 Thread boB Stepp
On Sun, May 5, 2013 at 7:54 PM, Steven D'Aprano st...@pearwood.info wrote: On 06/05/13 10:17, boB Stepp wrote: [...] But even on Windows that will not work, if you are running under IDLE. And unfortunately there is no official way to tell if you are running under IDLE, or any other IDE for

Re: [Tutor] Clear screen questions

2013-05-05 Thread Brian van den Broek
On 5 May 2013 22:10, boB Stepp robertvst...@gmail.com wrote: On Sun, May 5, 2013 at 7:54 PM, Steven D'Aprano st...@pearwood.info wrote: snip So my main question is there a truly clean, cross-platform solution to the clear screen dilemma? If my online searching is accurate, then the

Re: [Tutor] Clear screen questions

2013-05-05 Thread Steven D'Aprano
On 06/05/13 12:37, Brian van den Broek wrote: On 5 May 2013 22:10, boB Stepp robertvst...@gmail.com wrote: On Sun, May 5, 2013 at 7:54 PM, Steven D'Aprano st...@pearwood.info wrote: snip So my main question is there a truly clean, cross-platform solution to the clear screen dilemma? If

Re: [Tutor] Clear screen questions

2013-05-05 Thread Brian van den Broek
On 5 May 2013 23:12, Steven D'Aprano st...@pearwood.info wrote: On 06/05/13 12:37, Brian van den Broek wrote: snip Try: def pragmatic_as_if_clear(): print '\n' * 100 which isn't too far off of what clear does in bash. Not in the version of bash I am using in an xterm window. (To

[Tutor] exit message

2013-05-05 Thread Jim Mooney
I've noticed that if you exit() a program you always get a traceback message: Traceback (most recent call last): File pyshell#1, line 1, in module exit('what now?') File C:\Python33\lib\site.py, line 380, in __call__ raise SystemExit(code) What if you just want to exit for some normal

Re: [Tutor] exit message

2013-05-05 Thread Amit Saha
On Mon, May 6, 2013 at 2:24 PM, Jim Mooney cybervigila...@gmail.com wrote: I've noticed that if you exit() a program you always get a traceback message: Traceback (most recent call last): File pyshell#1, line 1, in module exit('what now?') File C:\Python33\lib\site.py, line 380, in

Re: [Tutor] exit message

2013-05-05 Thread Jim Mooney
Something like this? import sys while 1: ... sys.exit('Exiting from Infinite Loop') ... Exiting from Infinite Loop I still get a traceback message from the console. I just want a clean exit without that. I have a feeling I'm thinking about something the wrong way ;') Traceback (most

Re: [Tutor] exit message

2013-05-05 Thread Amit Saha
On Mon, May 6, 2013 at 2:56 PM, Jim Mooney cybervigila...@gmail.com wrote: Something like this? import sys while 1: ... sys.exit('Exiting from Infinite Loop') ... Exiting from Infinite Loop I still get a traceback message from the console. I just want a clean exit without that. I

Re: [Tutor] exit message

2013-05-05 Thread Zachary Ware
On Sun, May 5, 2013 at 11:24 PM, Jim Mooney cybervigila...@gmail.com wrote: I've noticed that if you exit() a program you always get a traceback message: Traceback (most recent call last): File pyshell#1, line 1, in module exit('what now?') File C:\Python33\lib\site.py, line 380, in