[ python-Bugs-1007046 ] os.startfile() doesn't accept Unicode filenames

SourceForge.net noreply at sourceforge.net
Wed Aug 11 08:47:57 CEST 2004


Bugs item #1007046, was opened at 2004-08-11 06:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1007046&group_id=5470

Category: Extension Modules
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Matthias Huening (huening)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.startfile() doesn't accept Unicode filenames

Initial Comment:
WinXP, Python 2.3.4

os.startfile() seems to have problems with Unicode
filenames. Example:

>>> import tkFileDialog
>>> import os
>>> f = tkFileDialog.askopenfilename()
>>> type(f)
<type 'unicode'>
>>> os.startfile(f)

Traceback (most recent call last):
  File "<pyshell#10>", line 1, in -toplevel-
    os.startfile(f)
UnicodeEncodeError: 'ascii' codec can't encode
characters in position 14-16: ordinal not in range(128)
>>> 



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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1007046&group_id=5470


More information about the Python-bugs-list mailing list