Re: [Tutor] Print to file

2013-03-11 Thread Hugo Arts
On Mon, Mar 11, 2013 at 10:38 AM, Phil wrote: > On 11/03/13 18:35, Hugo Arts wrote: > >> On Mon, Mar 11, 2013 at 9:24 AM, Phil > > wrote: >> >> The usage of print to file is much like the Arduino print to serial >> device and it's got me curious to know what t

Re: [Tutor] Print to file

2013-03-11 Thread Alan Gauld
On 11/03/13 08:24, Phil wrote: Neither of the following is correct, but the second one seems closer to the mark. >>> print("test", file="/home/phil/Python/words") Traceback (most recent call last): File "", line 1, in AttributeError: 'str' object has no attribute 'write' So this is obvio

Re: [Tutor] Print to file

2013-03-11 Thread Hugo Arts
On Mon, Mar 11, 2013 at 9:24 AM, Phil wrote: > The usage of print to file is much like the Arduino print to serial device > and it's got me curious to know what the correct syntax is. Neither of the > following is correct, but the second one seems closer to the mark. > > >>> print("test", file="/

[Tutor] Print to file

2013-03-11 Thread Phil
The usage of print to file is much like the Arduino print to serial device and it's got me curious to know what the correct syntax is. Neither of the following is correct, but the second one seems closer to the mark. >>> print("test", file="/home/phil/Python/words") Traceback (most recent call

Re: [Tutor] print to file probelm

2011-08-15 Thread Prasad, Ramit
Hi John, Just as a note, I am looking at the included scripts (and not the linked scripts). I believe the problem you are having is with the lines below. for i in range(len(faces)): f = faces[flist[i]] n = normals[flist[i]] s = s + ",%d" % len(f) for v in f: s = s

Re: [Tutor] print to file probelm

2011-08-15 Thread Peter Otten
John Collins wrote: > Hi, > I'm a baffled beginner. The script below is one of a suite of scripts > written by Simon Tatham a decade ago; > http://www.chiark.greenend.org.uk/~sgtatham/polyhedra/ > http://www.chiark.greenend.org.uk/~sgtatham/polyhedra/polyhedra.tar.gz > > OS: WinXP > Py Ver: 2

[Tutor] print to file probelm

2011-08-15 Thread John Collins
Hi, I'm a baffled beginner. The script below is one of a suite of scripts written by Simon Tatham a decade ago; http://www.chiark.greenend.org.uk/~sgtatham/polyhedra/ http://www.chiark.greenend.org.uk/~sgtatham/polyhedra/polyhedra.tar.gz OS: WinXP Py Ver: 2.7 Script: canvas.py It reads fro