Re: [Tutor] Nearly there

2006-01-07 Thread Alan Gauld
t; 0, > "print", > os.path.abspath(filename), > None, > ".", <--- try the full path here too. > 0 > ) HTH, Alan G. - Original Message - From: "Terry Carroll" <[EMAIL PROTECTED]> To: Sent: Saturday, January 07, 2006 12:23 AM Subject: Re: [T

Re: [Tutor] Nearly there

2006-01-07 Thread John Corry
2006 00:24 To: tutor@python.org Subject: Re: [Tutor] Nearly there This is itching at me, too. On Fri, 6 Jan 2006, John Corry wrote: > Can anyone understand or tell me why this works but the following code does > not:- > > import win32api > filename = "testprint.txt" &

Re: [Tutor] Nearly there

2006-01-06 Thread Terry Carroll
This is itching at me, too. On Fri, 6 Jan 2006, John Corry wrote: > Can anyone understand or tell me why this works but the following code does > not:- > > import win32api > filename = "testprint.txt" > fileobj=open (filename, "w") > fileobj.write ("This is a test") > fileobj.close() > win32api.

[Tutor] Nearly there

2006-01-06 Thread John Corry
Thanks for all the feedback and help. The good news is that I have managed to get my windows 98 SE machine to print a text file using the follwing code:- import tempfile import win32api filename = tempfile.mktemp (".txt") open (filename, "w").write ("This is a test") win32api.ShellExecute ( 0,