Reading, writing files

2009-08-21 Thread seanm
In the book I am using, they give the following function as an example: def copyFile(oldFile, newFile): f1 = open(oldFile, 'r') f2 = open(newFile, 'w') while True: text = f1.read(50) if text == "": break f2.write(text) f1.close() f2.close()

Re: 4 hundred quadrillonth?

2009-05-21 Thread seanm . py
On May 21, 5:36 pm, Christian Heimes wrote: > seanm...@gmail.com schrieb: > > > The explaination in my introductory Python book is not very > > satisfying, and I am hoping someone can explain the following to me: > > >>>> 4 / 5.0 > > 0.80004

4 hundred quadrillonth?

2009-05-21 Thread seanm . py
The explaination in my introductory Python book is not very satisfying, and I am hoping someone can explain the following to me: >>> 4 / 5.0 0.80004 4 / 5.0 is 0.8. No more, no less. So what's up with that 4 at the end. It bothers me. -- http://mail.python.org/mailman/listinfo/python

Re: Most Basic Question Ever - please help

2009-05-04 Thread seanm . py
On May 3, 12:22 am, CM wrote: > On May 2, 4:36 pm, seanm...@gmail.com wrote: > > > > > I am going to try posting here again with more detail to see if I can > > finally get my first program to work. > > > I am working on a MacBook Pro with OS X 10.4.11. I opened a

Re: Most Basic Question Ever - please help

2009-05-02 Thread seanm . py
On May 2, 6:25 pm, John Machin wrote: > On May 3, 7:46 am, Dave Angel wrote: > > > > > seanm...@gmail.com wrote: > > > I am going to try posting here again with more detail to see if I can > > > finally get my first program to work. > > > > I

Re: Help! Can't get program to run.

2009-05-02 Thread seanm . py
On May 2, 5:30 pm, Ned Deily wrote: > In article > <8f6634a2-c977-430a-b9f2-90ef9356d...@x6g2000vbg.googlegroups.com>, > >  seanm...@gmail.com wrote: > > Thank you for both for the help. I still cannot get the program to run > > though. Below I've copied my comm

Re: Help! Can't get program to run.

2009-05-02 Thread seanm . py
On May 2, 4:30 pm, Arnaud Delobelle wrote: > seanm...@gmail.com writes: > > sean-marimpietris-computer:~ seanmarimpietri$ python > > Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) > > [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin > > Type "help"

Most Basic Question Ever - please help

2009-05-02 Thread seanm . py
ed. I feel like the marathon just started and I've fallen flat on my face. Thanks. IDLE 2.6.2 >>> python module1.py SyntaxError: invalid syntax sean-m-computer:~ seanm$ python Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on d

Re: Help! Can't get program to run.

2009-05-02 Thread seanm . py
On May 1, 6:10 pm, Ned Deily wrote: > In article <7618rjf1a3t8...@mid.uni-berlin.de>, >  "Diez B. Roggisch" wrote: > > > > > seanm...@gmail.com schrieb: > > > I think this is maybe the most basic problem possible, but I can't get > > >

Help! Can't get program to run.

2009-05-01 Thread seanm . py
I think this is maybe the most basic problem possible, but I can't get even the most basic Python to run on OS X using Terminal or IDLE. I used the IDLE editor to create a file with one line of code print 'text string' and I saved the file as module1.py. When using terminal I entered "python" to