Reducing cache/buffer for faster display

2012-09-27 Thread Rikishi42
I have these 2 scripts that are very heavy on the file i/o, consume a very reasonable amount of cpu and output their counters at a - very - relaxed pace to the console. The output is very simply done using something like: print "files:", nFiles, "\r", Yet alltough there is no real reason for

Re: test

2012-09-27 Thread Rikishi42
On 2012-09-27, Devin Jeanpierre wrote: > On Thu, Sep 27, 2012 at 5:28 PM, ForeverYoung wrote: >> Please ignore this post. >> I am testing to see if I can post successfully. > > Is there a reason you can't wait until you have something to say / ask > to see if it works? You're spamming a large num

Re: Reducing cache/buffer for faster display

2012-09-27 Thread Rikishi42
On 2012-09-27, Chris Angelico wrote: > On Fri, Sep 28, 2012 at 7:57 AM, Rikishi42 wrote: >> I have these 2 scripts that are very heavy on the file i/o, consume a very >> reasonable amount of cpu and output their counters at a - very - relaxed >> pace to the console. The

Re: Reducing cache/buffer for faster display

2012-09-27 Thread Rikishi42
On 2012-09-27, Chris Angelico wrote: > On Fri, Sep 28, 2012 at 8:25 AM, John Gordon wrote: >> Isn't terminal output line-buffered? I don't understand why there would >> be an output delay. (Unless the "\r" is messing things up...) > > This is a classic progress-indication case, which does indee

Re: Reducing cache/buffer for faster display

2012-09-28 Thread Rikishi42
On 2012-09-28, Dennis Lee Bieber wrote: > On Thu, 27 Sep 2012 22:25:39 + (UTC), John Gordon > declaimed the following in gmane.comp.python.general: > >> >> Isn't terminal output line-buffered? I don't understand why there would >> be an output delay. (Unless the "\r" is messing things up..

Re: Reducing cache/buffer for faster display

2012-09-28 Thread Rikishi42
On 2012-09-28, Chris Angelico wrote: > On Fri, Sep 28, 2012 at 10:05 AM, Rikishi42 wrote: >> The scripts in question only increase numbers. But should that not be the >> case, solutions are simple enough. The numbers can be formatted to have a >> fixed size. In the case of

Re: Remove all directories using wildcard

2011-03-19 Thread Rikishi42
On 2011-03-18, JSkinn3 wrote: > I'm new to python and I am trying to figure out how to remove all sub > directories from a parent directory using a wildcard. For example, > remove all sub directory folders that contain the word "PEMA" from the > parent directory "C:\Data". > > I've trying to use

Re: English Idiom in Unix: Directory Recursively

2011-05-19 Thread Rikishi42
On 2011-05-18, Hans Georg Schaathun wrote: > Now Mac OS X has maintained the folder concept of older mac generations, > and Windows has cloned it. They do not want the user to understand > recursive data structures, and therefore, naturally, avoid the word. You imply they want to keep their user

Re: English Idiom in Unix: Directory Recursively

2011-05-23 Thread Rikishi42
On 2011-05-20, Hans Georg Schaathun wrote: >: It starts with the misconception (or should I say confusion?) between >: performing a recursive job and using a recursive tool to do it. And then it >: blazes off in these huge discusions about semantics to define a definition >: of an abstraction

Re: English Idiom in Unix: Directory Recursively

2011-05-23 Thread Rikishi42
On 2011-05-20, Steven D'Aprano wrote: > On Thu, 19 May 2011 22:13:14 -0700, rusi wrote: > >> [I agree with you Xah that recursion is a technical word that should not >> be foisted onto lay users.] > > I think that is a patronizing remark that under-estimates the > intelligence of lay people and o

Re: English Idiom in Unix: Directory Recursively

2011-05-24 Thread Rikishi42
On 2011-05-24, Steven D'Aprano wrote: >>> I think that is a patronizing remark that under-estimates the >>> intelligence of lay people and over-estimates the difficulty of >>> understanding recursion. >> >> Why would you presume this to be related to intelligence? The point was >> not about being

Re: English Idiom in Unix: Directory Recursively

2011-05-28 Thread Rikishi42
On 2011-05-25, Steven D'Aprano wrote: > I know many people who have no idea what a directory is, let alone a > subdirectory, unless it's the phone directory. They're non-computer > users. Once they start using computers, they quickly work out what the > word means in context, or they ask and ge

Re: English Idiom in Unix: Directory Recursively

2011-05-30 Thread Rikishi42
On 2011-05-28, Chris Angelico wrote: > I think it's geographic. This list covers a lot of geography; I'm in > Australia, there are quite a few Brits, and probably the bulk of posts > come from either the US or Europe. (And yes, I did deliberately fold > all of Europe down to one entity, and I did

Re: English Idiom in Unix: Directory Recursively

2011-05-30 Thread Rikishi42
On 2011-05-28, Chris Angelico wrote: > Chris Angelico > yes, bit of a Bible geek as well as a programming geek So you don't believe in genetic algorithms, then ? (ducking for cover) -- When in doubt, use brute force. -- Ken Thompson -- http://mail.python.org/mailman/listinf

Need GUI pop-up to edit a (unicode ?) string

2011-01-22 Thread Rikishi42
I'm in need for a graphical pop-up that will display a (unicode ?) string in a field, allow the user to change it and return the modified string. Maybe also keep the original one displayed above it. Something like this: +-+ | Please confirm or e

Re: Need GUI pop-up to edit a (unicode ?) string

2011-01-22 Thread Rikishi42
On 2011-01-22, Corey Richardson wrote: > On 01/22/2011 03:22 PM, Rikishi42 wrote: >> >> I'm in need for a graphical pop-up that will display a (unicode ?) string in >> a field, allow the user to change it and return the modified string. >> > If that is all yo

Re: Need GUI pop-up to edit a (unicode ?) string

2011-01-23 Thread Rikishi42
On 2011-01-22, geremy condra wrote: > If windows doesn't matter to you, just use Zenity. Here's a python > function wrapping zenity that does what you want: > > import commands > > def confirm_or_edit(s): > zenity = 'zenity' > mode = '--entry' > text = "--text='Please confirm or edit t

Re: Easy function, please help.

2011-02-09 Thread Rikishi42
On 2011-02-09, Michael Hrivnak wrote: > Your function only works if n is an integer. Example: > num_digits(234) > 3 num_digits(23.4) > 325 > > When doing integer division, python will throw away the remainder and > return an int. Using your example of n==44, 44/10 == 4 and 4/10 == 0 >

Re: Easy function, please help.

2011-02-09 Thread Rikishi42
On 2011-02-09, rantingrick wrote: > On Feb 9, 1:08�am, Paul Rudin wrote: >> Nanderson writes: >> > loop would be infinite. I get what is happening in the function, and I >> > understand why this would work, but for some reason it's confusing me >> > as to how it is exiting the loop after a certa