Re: [Tutor] running python program on Linux Virtual Server - Plesk?

2009-09-02 Thread Christian Witts
Michael Yang wrote: Hi Everyone, I'm new to programming and to python. I have a program I want to run on my Media Temple Virtual Server (dv) - Linux. which has the latest Plesk 9 virtuozzo installed. Ultimately I want it to run the program (main.py) on a scheduled basis. How do I do this?

[Tutor] running python program on Linux Virtual Server - Plesk?

2009-09-02 Thread Michael Yang
Hi Everyone, I'm new to programming and to python. I have a program I want to run on my Media Temple Virtual Server (dv) - Linux. which has the latest Plesk 9 virtuozzo installed. Ultimately I want it to run the program (main.py) on a scheduled basis. How do I do this? Thanks! -Mike ___

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

2009-09-02 Thread ALAN GAULD
Not in general. Variables change too quickly for that to be viable - think >>about a loop counter in a while loop, it could change millions of times per second! >> >> >Could you not use an observer pattern here to do that? > >http://en.wikipedia.org/wiki/Observer_pattern > You could but the d

Re: [Tutor] I always get this message as a reply

2009-09-02 Thread Alan Gauld
"Kristina Ambert" wrote It feels like I'm getting spam or something. Geneviève DIAGORN to me Genevieve sets her vacation reminder when she is out of the office. Unfortunately she doesn't turn off her tutor subscription! And equally unfortunately her autoresponder doesn't recognise addresses

Re: [Tutor] Boolean operations

2009-09-02 Thread Alan Gauld
"Anthony Casey" wrote five and two 2 I understand what it's doing here: returning the operand. But what is the practical application of that? How might I use that function? Try bool(2) True bool(0) False So you can use the retuirn from the and as a boolean value in a test condition:

Re: [Tutor] Boolean operations

2009-09-02 Thread Kent Johnson
On Wed, Sep 2, 2009 at 6:30 AM, Anthony Casey wrote: > Hello, tutors. > > I'm someone who used to programme as a hobby and who is trying to get back > into it via Python. I'm reading Programming in Python 3 by Summerfield > (excellent book). > > I read something unusual about Boolean operations in

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

2009-09-02 Thread bob gailer
Kristina Ambert wrote: Hi, Thanks for the responses guys. I'll clear up my question a bit more maybe, the application which data I'm accessing doesn't store it's information in a database, it only stores it in the application at runtime. I did think to ask to have a module send the data to my

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

2009-09-02 Thread Kristina Ambert
Hi, Thanks for the responses guys. I'll clear up my question a bit more maybe, the application which data I'm accessing doesn't store it's information in a database, it only stores it in the application at runtime. I did think to ask to have a module send the data to my application like what you g

Re: [Tutor] I always get this message as a reply

2009-09-02 Thread Christian Witts
Kristina Ambert wrote: Hi, I just wanted to ask if everyone else gets this message as a first reply everytime you send out a message to tutor. It feels like I'm getting spam or something. Geneviève DIAGORN to me show details 3:59 PM (17 hours ago) Bonjour, Je suis

Re: [Tutor] I always get this message as a reply

2009-09-02 Thread vince spicer
On Wed, Sep 2, 2009 at 7:55 AM, Kristina Ambert wrote: > Hi, > > I just wanted to ask if everyone else gets this message as a first reply > everytime you send out a message to tutor. > It feels like I'm getting spam or something. > Geneviève DIAGORN to me > show details 3:59 PM (17 hours ago) > >

[Tutor] I always get this message as a reply

2009-09-02 Thread Kristina Ambert
Hi, I just wanted to ask if everyone else gets this message as a first reply everytime you send out a message to tutor. It feels like I'm getting spam or something. Geneviève DIAGORN to me show details 3:59 PM (17 hours ago) Bonjour, Je suis absente jusqu'au 02/09 inclus. En cas d'urgence Soprane

Re: [Tutor] Boolean operations

2009-09-02 Thread vince spicer
On Wed, Sep 2, 2009 at 4:30 AM, Anthony Casey wrote: > Hello, tutors. > > I'm someone who used to programme as a hobby and who is trying to get back > into it via Python. I'm reading Programming in Python 3 by Summerfield > (excellent book). > > I read something unusual about Boolean operations i

[Tutor] Boolean operations

2009-09-02 Thread Anthony Casey
Hello, tutors. I'm someone who used to programme as a hobby and who is trying to get back into it via Python. I'm reading Programming in Python 3 by Summerfield (excellent book). I read something unusual about Boolean operations in Python: >>> five = 5 >>> two = 2 >>> zero = 0 >>> five and two 2

Re: [Tutor] Rounding to n significant digits

2009-09-02 Thread Sander Sweers
2009/9/2 Alan Gauld : > That having been said the two approaches, string or math, are equally > valid. I suspect the math version will be much slower since it calls > several functions but I haven't timed  it. > >>> def round_to_n(x, n): >>>         fmt = "%%.%de" % (n) >>>         return float( fm

Re: [Tutor] Rounding to n significant digits

2009-09-02 Thread Alan Gauld
"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: The usual question is why would you want to lose precision in your data? Significan

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

2009-09-02 Thread Alan Gauld
"Kristina Ambert" wrote 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? Not in general. Variables change too quickly for that to be viable - thi