2009/2/3 David :
> while(doit):
>mytime = list(time.localtime())
>hour = mytime[3]
>minute = mytime[4]
>if hour == alarmhour and minute == alarmmin:
>subprocess.call('mplayer -loop 9 ring.wav', shell=True)
>sys.exit()
Hi David,
What
Hi All,
As I am getting a little older, I sometimes take small naps to recharge
my batteries:) Is this while loop OK? What kind of error checking should
I use?
thanks
-david
#!/usr/bin/python
import time
import subprocess
import sys
doit = 1
alarmhour = int(raw_input("Please enter the hour
> > I'd like to match any line that does not start with FOO. (Using just a
> > reg-ex
> rule)
> >
> > 1) What is the effective difference between:
> >
> > (?!^FOO).*
> >
> > ^(?!FOO).*
> >
> > 2) Is there a better way to do this?
> >
>
> myline = 'FOO things in line'
>
> >>> myline.startswi
# program to find square root
square = float(raw_input ("Please enter a number to be rooted, "))
guess = input("Please guess at the root, ")
i = 0
while guess**2 != square:
i+=1
# Newton's formula
guess = guess - (guess * guess - square) / (guess * 2)
print i
print
2009/2/3 Tim Johnson :
>> - wrong libraries
> how do we resolve paths to libraries?
Well, like I suggested, you could try building a staticly-linked
version. Then it doesn't matter.
Otherwise, I'm not sure. Maybe you could figure out what libraries
you need, upload them, and play around with
On Monday 02 February 2009, John Fouhy wrote:
> 2009/2/3 Tim Johnson :
> > I have a client who is hosting under virtual domain services that do not
> > provide python.
> > He has unlimited disk space available ( or so the hoster says) and they
> > would allow installation of binaries in the virtual
On Mon, Feb 2, 2009 at 6:50 PM, WM. wrote:
># Newton's formula
>newguess = guess - (guess * guess - square) / (guess * 2)
>guess = newguess
or
guess = (guess + square/guess)/2
Kent
___
Tutor maillist - Tutor@python.org
http:/
2009/2/3 Tim Johnson :
> I have a client who is hosting under virtual domain services that do not
> provide python.
> He has unlimited disk space available ( or so the hoster says) and they
> would allow installation of binaries in the virtual domain via ftp.
>
> It's a linux 'box' with a /private
I have a client who is hosting under virtual domain services that do not
provide python.
He has unlimited disk space available ( or so the hoster says) and they
would allow installation of binaries in the virtual domain via ftp.
It's a linux 'box' with a /private folder under the domain root. giv
On Tue, Feb 3, 2009 at 9:46 AM, Bernard Rankin wrote:
> Hello,
>
>
> I'd like to match any line that does not start with FOO. (Using just a
> reg-ex rule)
>
> 1) What is the effective difference between:
>
> (?!^FOO).*
>
> ^(?!FOO).*
>
> 2) Is there a better way to do this?
>
myline = 'FOO thin
"WM." wrote
square = input ('Please enter a number to be rooted, ')
square = square * 1.0
Use raw_input() instead of input() and don't multiply
by 1.0 - instead convert to float using float():
square = float( raw_input ('Please enter a number to be rooted, '))
guess = input('Please guess a
# program to find square root
square = input ('Please enter a number to be rooted, ')
square = square * 1.0
guess = input('Please guess at the root, ')
guess = guess * 1.0
newguess = 0.
while guess**2 != square:
# Newton's formula
newguess = guess - (guess * guess - square) / (gue
Hello,
I'd like to match any line that does not start with FOO. (Using just a reg-ex
rule)
1) What is the effective difference between:
(?!^FOO).*
^(?!FOO).*
2) Is there a better way to do this?
Thanks,
:)
___
Tutor maillist - Tutor
Does anybody know if there is a precision difference when I use mpmath and
take an expression:
from mpmath import *
mp.dps = 100
mu0 = [mpf('4') * pi * power(10, -7)
rather then:
mu0 = fprod([mpf('4'), pi, power(10, -7)])
?
Thanks,
-- Bernd
___
Tutor
wrote>
I am trying to read data from a file that has format
item_name num_items item_type items
eg
TIME 1 0.0
DISTANCE 10 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
Where is the item_type?
I can read this if the data are in ASCII format using
in_file = open("my_file.dat",
On Mon, 2009-02-02 at 11:31 +, etrade.griffi...@dsl.pipex.com wrote:
> Hi
>
> I am trying to read data from a file that has format
>
> item_name num_items item_type items
>
> eg
>
> TIME 1 0.0
> DISTANCE 10 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
> TIME 1 1.0
> DISTANCE
Hi
I am trying to read data from a file that has format
item_name num_items item_type items
eg
TIME 1 0.0
DISTANCE 10 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
TIME 1 1.0
DISTANCE 10 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0
I can read this if the data are in ASCII format us
17 matches
Mail list logo