[Chicago] Got it Re: opening a file for read in 3.2
rlbax777 at swbell.net
Thu Nov 1 19:35:06 CET 2012
In the lectures they hard coded the file name and path for input and used tkinter.filedialog.askopenfilename() for output but since that brought up finder I suspected that was not a good idea for a windows machine and I did not know the equivalent import and call in windows.
I am concentrating on learning the language syntax first for at least the next two weeks when I will begin to try and catch up in the Rice class after finishing the U of Toronto class.
--- On Thu, 11/1/12, sheila miguez <shekay at pobox.com> wrote:
From: sheila miguez <shekay at pobox.com>
Subject: Re: [Chicago] Got it Re: opening a file for read in 3.2
To: "The Chicago Python Users Group" <chicago at python.org>
Date: Thursday, November 1, 2012, 12:11 PM
I'm glad you figured it out. I didn't want to reply to the original question because I didn't have a windows computer to test out my answers on thus could not be sure I'd give you a correct answer.
Anyway, another thing to think about, for the future, is that path delimiters are different on different operating systems. I don't know if the class covered that or not, but check it out at some point in case you want to write scripts that can work on different OSs. So instead of using literal strings where you hard code the path separator, '/', do it programmatically.
-----Inline Attachment Follows-----
Chicago mailing list
Chicago at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chicago