Re: [Tutor] Rounding to n significant digits

2009-09-01 Thread Skipper Seabold
On Tue, Sep 1, 2009 at 10:00 PM, Skipper Seabold wrote: > On Tue, Sep 1, 2009 at 9:44 PM, Richard Wagner wrote: >> I'm fairly new to Python and am trying to find a simple way to round floats >> to a specific number of significant digits.  I found an old post on this >> list with exactly the same pr

Re: [Tutor] Rounding to n significant digits

2009-09-01 Thread Skipper Seabold
On Tue, Sep 1, 2009 at 9:44 PM, Richard Wagner wrote: > I'm fairly new to Python and am trying to find a simple way to round floats > to a specific number of significant digits.  I found an old post on this > list with exactly the same problem: > Python 2.5.4 (r254:67916, Apr 4 2009, 17:56:17) [G

[Tutor] Rounding to n significant digits

2009-09-01 Thread Richard Wagner
I'm fairly new to Python and am trying to find a simple way to round floats to a specific number of significant digits. I found an old post on this list with exactly the same problem: Is there something (a function?) in Python 2.

Re: [Tutor] Easy Problem

2009-09-01 Thread Luke Paireepinart
On Tue, Sep 1, 2009 at 7:46 AM, Sander Sweers wrote: > 2009/9/1 Luke Paireepinart : > txt = "Hi how are you?" > " ".join(txt.strip().split()) > > 'Hi how are you?' > > txt.strip() only remove leading and trailing white space so does > nothing in your example. It removes newline

Re: [Tutor] Easy Problem

2009-09-01 Thread Dave Kuhlman
On Mon, Aug 31, 2009 at 06:43:29PM -0700, Ishan Puri wrote: > >Hello, >I have 2 plain text documents that have uneven spacing. I need to >make these single spaced between lines and between words. Basically I >need to get them to be equal character length after I abridge the >

Re: [Tutor] Tracking variable changes in a different application

2009-09-01 Thread Emile van Sebille
On 9/1/2009 12:51 PM Kristina Ambert said... Hi again, The question might be a tad confusing, but what I want to ask is, if it's possible to track if and when a variable in an application has changed, and then grab the new content of that variable? So, you want to be notified when a field in

[Tutor] Tracking variable changes in a different application

2009-09-01 Thread Kristina Ambert
Hi again, The question might be a tad confusing, but what I want to ask is, if it's possible to track if and when a variable in an application has changed, and then grab the new content of that variable? I have my product inventory database application which is attached to another bigger applicati

Re: [Tutor] Easy Problem

2009-09-01 Thread Kent Johnson
On Mon, Aug 31, 2009 at 9:43 PM, Ishan Puri wrote: > Hello, >     I have 2 plain text documents that have uneven spacing. I need to make > these single spaced between lines and between words. Basically I need to get > them to be equal character length after I abridge the uneven spacing. I don't kn

Re: [Tutor] Easy Problem

2009-09-01 Thread Sander Sweers
2009/9/1 Luke Paireepinart : txt = "Hi          how are you?" " ".join(txt.strip().split()) > 'Hi how are you?' txt.strip() only remove leading and trailing white space so does nothing in your example. However it works because txt.split() removes the excessive white space between the tex

Re: [Tutor] Please delete my mail address from that mail list. Thanks!

2009-09-01 Thread Kent Johnson
On Tue, Sep 1, 2009 at 4:30 AM, Mac Ryan wrote: > May I suggest, > > to slightly tweak the signature of the ML with something like: > > --- > Tutor mailing list  -  tu...@python.org > Configuration options (including unsubscribing): > http://mail.python.org/mailman/listinfo/tutor > --- Good idea,

Re: [Tutor] Please delete my mail address from that mail list. Thanks!

2009-09-01 Thread Mac Ryan
On Tue, 2009-09-01 at 04:27 +0200, Luke Paireepinart wrote: > there are directions on how to remove yourself from the list at the > bottom of every message that the list sends out. > ___ > click. > ___