[Tutor] upper and lower case input for file name

earlylight publishing earlylightpublishing at yahoo.com
Sat Dec 15 18:06:06 CET 2007


I don't know if this'll help or not but I just learned about this:
   
  file = raw_input(info).lower
   
  The .lower is supposed to convert any input to lower case.  
   
  ------------------------------

Message: 4
Date: Fri, 14 Dec 2007 11:14:13 -0500
From: "Bryan Fodness" <bryan.fodness at gmail.com>
Subject: [Tutor] upper and lower case input for file name
To: tutor-python <tutor at python.org>
Message-ID:
 <fbf64d2b0712140814o27351c35l23ed6259e2120ac7 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Is there an easy way that an input can be upper or lower case?

The file name is TEST.TXT, and I get.

-------------------------------------------------------------------------

Enter File (if not local, enter path):    test.txt

Traceback (most recent call last):
  File "test.py", line 52, in <module>
    for line in open(file) :
IOError: [Errno 2] No such file or directory: 'test.txt'

-------------------------------------------------------------------------

This is a non-issue on Windows, but now I have migrated to Ubuntu.

Bryan


       
---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071215/f2f3d9cf/attachment.htm 


More information about the Tutor mailing list