[Python-checkins] CVS: python/dist/src/Lib/lib-tk tkFileDialog.py,1.4,1.5
Martin v. L?wis
loewis@users.sourceforge.net
Sun, 30 Dec 2001 06:43:58 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Lib/test test_complex.py,1.7,1.8 test_support.py,1.40,1.41
- Next message: [Python-checkins] CVS: python/dist/src/Mac/Modules/ctl _Ctlmodule.c,1.13,1.14 ctlscan.py,1.25,1.26 ctlsupport.py,1.47,1.48
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory usw-pr-cvs1:/tmp/cvs-serv17192
Modified Files:
tkFileDialog.py
Log Message:
Print encoded versions of the file names in test application.
Index: tkFileDialog.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/tkFileDialog.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** tkFileDialog.py 2001/11/08 17:51:33 1.4
--- tkFileDialog.py 2001/12/30 14:43:56 1.5
***************
*** 125,129 ****
if __name__ == "__main__":
! print "open", askopenfilename(filetypes=[("all filez", "*")])
! print "saveas", asksaveasfilename()
--- 125,143 ----
if __name__ == "__main__":
+ # Since the file name may contain non-ASCII characters, we need
+ # to find an encoding that likely supports the file name, and
+ # displays correctly on the terminal.
! # Start off with UTF-8
! enc = "utf-8"
!
! # See whether CODESET is defined
! try:
! import locale
! enc = locale.nl_langinfo(locale.CODESET)
! except (ImportError, AttributeError):
! pass
!
! print "open", askopenfilename(filetypes=[("all filez", "*")]).encode(enc)
! print "saveas", asksaveasfilename().encode(enc)
!
- Previous message: [Python-checkins] CVS: python/dist/src/Lib/test test_complex.py,1.7,1.8 test_support.py,1.40,1.41
- Next message: [Python-checkins] CVS: python/dist/src/Mac/Modules/ctl _Ctlmodule.c,1.13,1.14 ctlscan.py,1.25,1.26 ctlsupport.py,1.47,1.48
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]