[Tutor] How to make tkMessage function to have duration

2011-07-30 Thread Emeka
Hello All, Say I have the below(code), I would want the message to last say 30 seconds and afterwards disappear. I won't want the user to be the one to enable it to disappear. Basically, what I want is to be able to show the user some message , and after some seconds, the message goes away

Re: [Tutor] How to make tkMessage function to have duration

2011-07-30 Thread Steven D'Aprano
Emeka wrote: Hello All, Say I have the below(code), I would want the message to last say 30 seconds and afterwards disappear. I won't want the user to be the one to enable it to disappear. Basically, what I want is to be able to show the user some message , and after some seconds, the mess

Re: [Tutor] How to make tkMessage function to have duration

2011-07-30 Thread Emeka
Steven,, Thanks! Emeka On Sat, Jul 30, 2011 at 12:25 PM, Steven D'Aprano wrote: > Emeka wrote: > >> Hello All, >> >> Say I have the below(code), I would want the message to last say 30 >> seconds and afterwards disappear. I won't want the user to be the one to >> enable it to disappear.

[Tutor] newbie needs pypy setup tips

2011-07-30 Thread Tom Roche
I need advice about configuring pypy to run other python code. Why I ask: I'm running a model implemented in python. Unfortunately a run on "straight" python 2.6.x or 2.7.x requires - 130 min on my ubuntu laptop (on which working would be more convenient) - 55 min on a better build machine on w

Re: [Tutor] newbie needs pypy setup tips

2011-07-30 Thread eire1130
I think, but not 100 percent, that pypy has a list. You might get better traction there if you don't get a good *nswer here. Although I have a couple questions. Have you profiled in python to look for hotspots? Have you tried writting portions in c? What kind of model is it, out of curiousity.

Re: [Tutor] Mainloop conflict

2011-07-30 Thread Christopher King
I think I'll go with threading. I've become more familiar with it. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Mainloop conflict

2011-07-30 Thread Stefan Behnel
Christopher King, 31.07.2011 04:30: I think I'll go with threading. I've become more familiar with it. That's ok. When used carefully, threads can be pretty helpful to gain concurrency in I/O tasks. But just in case you ever feel like using them for anything else, this is worth a read: ht

[Tutor] How to replace the '\'s in a path with '/'s?

2011-07-30 Thread Richard D. Moores
64-bit Vista Python 3.2.1 I would like to write a function that would take a path such as 'C:\Users\Dick\Desktop\Documents\Notes\College Notes.rtf' and return 'C:/Users/Dick/Desktop/Documents/Notes/College Notes.rtf' . I've tried this: def test(path): return path.replace('\', '/') print(test(

Re: [Tutor] How to replace the '\'s in a path with '/'s?

2011-07-30 Thread Dharmit Shah
Ruchard, Try return path.replace('\\', '/'). That gave me the output desired by you. I don't know the reason. But I guess it's because \ is used as escape character. I am sure someone in the list will point out the accurate reason. On Sun, Jul 31, 2011 at 10:58 AM, Richard D. Moores wrote: > 64-

Re: [Tutor] How to replace the '\'s in a path with '/'s?

2011-07-30 Thread ian douglas
Try a double backslash replace('\\','/') On Jul 30, 2011 10:30 PM, "Richard D. Moores" wrote: > 64-bit Vista > Python 3.2.1 > > I would like to write a function that would take a path such as > 'C:\Users\Dick\Desktop\Documents\Notes\College Notes.rtf' > and return 'C:/Users/Dick/Desktop/Documents

Re: [Tutor] How to replace the '\'s in a path with '/'s?

2011-07-30 Thread Alexander Etter
On Jul 31, 2011, at 1:28, "Richard D. Moores" wrote: > 64-bit Vista > Python 3.2.1 > > I would like to write a function that would take a path such as > 'C:\Users\Dick\Desktop\Documents\Notes\College Notes.rtf' > and return 'C:/Users/Dick/Desktop/Documents/Notes/College Notes.rtf' . I've > tri

Re: [Tutor] How to replace the '\'s in a path with '/'s?

2011-07-30 Thread Sandip Bhattacharya
On Sat, Jul 30, 2011 at 10:28:11PM -0700, Richard D. Moores wrote: > File "c:\P32Working\untitled-5.py", line 2 >return path.replace('\', '/') >^ > SyntaxError: EOL while scanning string literal > Process terminated with an exit code of 1 The first backslash up