Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
I'm running Windows XP Home, but Albertito tried the same code on XP Pro, and got the same response. - Original Message - From: "Kristian Zoerhoff" <[EMAIL PROTECTED]> To: Sent: Wednesday, August 03, 2005 7:42 PM Subject: Re: [Tutor] Help with file I/O. >

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
Thanks Danny. Albertito and me thought there might be a bug there. I see that guess was wrong. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor" Sent: Wednesday, August 03, 2005 7:41

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Kristian Zoerhoff
On 8/3/05, Nathan Pinno <[EMAIL PROTECTED]> wrote: > The error was: > Warning: Problem with getpass. Passwords may be echoed. This sounds like a problem with your terminal. What OS are you running this on? It appears to be some variant of Windows, based on your earlier posts, but the particular ve

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, Nathan Pinno wrote: > > Warning: Problem with getpass. Passwords may be echoed. > It does indeed echo. I forgot to add that. Hi Nathan, If you're running your program under IDLE, we shouldn't expect too much: getpass depends on running under a console environment, and pro

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
e" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, August 03, 2005 3:42 PM Subject: Re: [Tutor] Help with file I/O. > The error was: > Warning: Problem with getpass. Passwords may be echoed. > > > > My code is: > > #This is for a password protected program to store pa

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
break else: print "That's not an option!" print "Have a nice day!" Thanks for the help! Nathan Pinno - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Albert

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Alan G
> When I ran my new password program, using getpass, it warned me that > passwords might be echoed, because there was a problem with getpass. > How do I fix this? Can we see the code and error message. Otherwise we'd just be guessing... The Python error messages usually tell you as much as you

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
>; "Alberto Troiano" <[EMAIL PROTECTED]>; "Danny Yoo" <[EMAIL PROTECTED]>; "luke" <[EMAIL PROTECTED]> Cc: Sent: Sunday, July 31, 2005 6:19 PM Subject: Re: [Tutor] Help with file I/O. >>> You might find the getpass module useful for that

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Alan G
>> You might find the getpass module useful for that... >> It provides a raw_input style prompt that doesn't >> display what the user types... > Does it display stars instead? No, its more secure than that, it doesn't display anything. But like anything in Python the esiest way to find out is j

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
MAIL PROTECTED]> Cc: Sent: Sunday, July 31, 2005 5:45 PM Subject: Re: [Tutor] Help with file I/O. >> baffling me. Now I'm first going to write the main part of a password > > You might find the getpass module useful for that... > It

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Alan G
> baffling me. Now I'm first going to write the main part of a > password You might find the getpass module useful for that... It provides a raw_input style prompt that doesn't display what the user types... HTH, Alan G. ___ Tutor maillist - Tutor@

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
ECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Danny Yoo" <[EMAIL PROTECTED]> Cc: Sent: Sunday, July 31, 2005 4:04 PM Subject: Re: [Tutor] Help with file I/O. > Nathan, > > I saw in your previous example that you called > #quote > file =

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Alan G
> file = raw_input("File name please: ") > f = file(file, "r") The problem is you used 'file' as a name. But file() is the function to open a file. So in the second line you call your filename as if it was a function! Try using 'filename' for your variable instead. It's never a good idea to us

Re: [Tutor] Help with file I/O.

2005-07-31 Thread luke
": WriteToFile(text,filename) else: WriteToFile(text) hope that helps. -Luke > - Original Message - > From: "Nathan Pinno" <[EMAIL PROTECTED]> > To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Danny Yoo" > <[EMAIL PROT

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
om: "Nathan Pinno" <[EMAIL PROTECTED]> > To: "Danny Yoo" <[EMAIL PROTECTED]> > Cc: > Sent: Sunday, July 31, 2005 2:29 PM > Subject: Re: [Tutor] Help with file I/O. > > >> Here's my work. I call it filewriter. >> The code: >>

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
Sent: Sunday, July 31, 2005 2:29 PM Subject: Re: [Tutor] Help with file I/O. > Here's my work. I call it filewriter. > The code: > file = raw_input("File name please: ") > f = file(file, "r") > for line in f.readlines(): >print line > f.close() >

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
understand. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo" <[EMAIL PROTECTED]> Cc: Sent: Sunday, July 31, 2005 2:29 PM Subject: Re: [Tutor] Help with file I/O. > Here's my work. I call it filewriter. > The code: > file

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: Sent: Sunday, July 31, 2005 12:22 AM Subject: Re: [Tutor] Help with file I/O. > > > On Sun, 31 Jul 2005, Nathan Pinno wrote: > >> Well, you saw my password program. That was my first attempt at using >> file I/O

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Alan G
> If anyone will help me learn file I/O, it would be appreciated. > I went through Josh Cogliani's Non-Programmer's Tutorial for Python, > and I still can't understand it. What exactly don't you understand? Try the file handling topic in my tutor. see if thats any clearer? It covers opening, read

Re: [Tutor] Help with file I/O.

2005-07-30 Thread Danny Yoo
On Sun, 31 Jul 2005, Nathan Pinno wrote: > Well, you saw my password program. That was my first attempt at using > file I/O. Thought I'd try it big time. You saw where that went. Ok, let's take a look. It was from this message, right? http://mail.python.org/pipermail/tutor/2005-July/03947

Re: [Tutor] Help with file I/O.

2005-07-30 Thread Nathan Pinno
unday, July 31, 2005 12:13 AM Subject: Re: [Tutor] Help with file I/O. > > >> If anyone will help me learn file I/O, it would be appreciated. I went >> through Josh Cogliani's Non-Programmer's Tutorial for Python, and I >> still can't understand it. >

Re: [Tutor] Help with file I/O.

2005-07-30 Thread Danny Yoo
> If anyone will help me learn file I/O, it would be appreciated. I went > through Josh Cogliani's Non-Programmer's Tutorial for Python, and I > still can't understand it. Hi Nathan, Can you point out what parts don't make sense? We can try to explain better, but we can only do so if you eithe

Re: [Tutor] Help with file I/O.

2005-07-30 Thread python-tutor
Have you worked through the diveintopython.org tutorial/book? Chapter 6 covers file handling. If/When you get stuck post your code/question and ask for help. --Todd On Saturday 30 July 2005 11:49 pm, Nathan Pinno wrote: > If anyone will help me learn file I/O, it would be appreciated. I went

[Tutor] Help with file I/O.

2005-07-30 Thread Nathan Pinno
If anyone will help me learn file I/O, it would be appreciated. I went through Josh Cogliani's Non-Programmer's Tutorial for Python, and I still can't understand it.   Thanks in advance, Nathan Pinno ___ Tutor maillist - Tutor@python.org http://mai