Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98997

Re: handling of non-ASCII filenames?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: handling of non-ASCII filenames?
Date Thu, 19 Nov 2015 07:29:24 +1100
Lines 82
Message-ID <mailman.425.1447878573.16136.python-list@python.org> (permalink)
References <n2i9vt$icf$1@news2.informatik.uni-stuttgart.de> <mailman.417.1447865700.16136.python-list@python.org> <n2iete$js9$1@news2.informatik.uni-stuttgart.de>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de lh+2RqFKCuFabR3pEcdgFw1fIuiZqw9ehPrw6zgu9Abw==
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'compiler': 0.05; 'importerror:': 0.05; 'newbie': 0.05; 'skip:" 60': 0.05; '21,': 0.07; 'cc:addr:python-list': 0.09; '40,': 0.09; 'failed:': 0.09; 'name)': 0.09; 'url:unicode': 0.09; 'python': 0.10; 'python.': 0.11; 'itself.': 0.11; 'encoding': 0.15; 'thu,': 0.15; "(i'm": 0.16; '64,': 0.16; 'ah,': 0.16; 'apology': 0.16; 'exe': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'happily': 0.16; 'hmm.': 0.16; 'pyinstaller': 0.16; 'pywintypes': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'skip:" 70': 0.16; 'slides.': 0.16; 'subject:handling': 0.16; 'subject:non': 0.16; 'topic?': 0.16; 'windows:': 0.16; 'worst': 0.16; 'wrote:': 0.16; 'skip:g 40': 0.18; 'skip:l 30': 0.18; 'runs': 0.18; 'thanks.': 0.18; 'load': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'skip:" 40': 0.20; 'meant': 0.22; '31,': 0.22; 'programming': 0.22; 'am,': 0.23; 'specified': 0.23; 'import': 0.24; '(most': 0.24; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'script': 0.25; 'chris': 0.26; 'skip:_ 20': 0.26; 'separate': 0.27; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; 'dll': 0.27; 'found.': 0.27; "skip:' 10": 0.28; 'character': 0.29; "i'm": 0.30; 'skip:_ 10': 0.32; 'maybe': 0.33; 'run': 0.33; 'traceback': 0.33; 'case,': 0.34; 'file': 0.34; 'received:google.com': 0.35; 'so,': 0.35; 'could': 0.35; 'nov': 0.35; 'skip:" 50': 0.35; 'skip:. 20': 0.35; 'unicode': 0.35; 'quite': 0.35; "isn't": 0.35; 'skip:p 30': 0.35; 'step': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'basic': 0.36; 'skip:_ 40': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'received:209.85.213': 0.37; 'thought': 0.37; 'received:209': 0.38; 'stuff': 0.38; 'skip:p 20': 0.38; 'sure': 0.39; 'does': 0.39; "didn't": 0.39; 'subject:-': 0.39; 'where': 0.40; 'your': 0.60; 'skip:u 10': 0.61; 'back': 0.62; 'introduction': 0.63; 'great': 0.63; '20,': 0.66; 'here': 0.66; 'articles': 0.67; 'expert': 0.70; 'pictures': 0.75; 'chrisa': 0.84; 'ine': 0.84; 'to:none': 0.91; '"how': 0.91; 'talk,': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=FTfB6Oj/qG6tScNVExOAWZvWUQs1aa/wKWn7vAMlYac=; b=Kc2zIL/LTxgk6bqDHZX5PPRDE53mHYm0YmqmaUtAV6B2BimA/EMO6tYyIprSvHjbhS aYdVGj8Nyk7P7LJZNbPRa7Kryrp/Id6sYmDyfAvDslyms5NMiiXIFPwrU5py42o+msNA ZbwRPkfgSxu209RhVPtw/momcMu1WxGXxDp0H3RkpurKG3gQmZvO3CvNnFTUMpiaOC+P hu3kRkK79wF4Pfu1eeVll3Y7yQOCKrslvsHfhAuevdqKA+kggHfN5pu6WAHF6nAn4v18 ZBkF0rVV19BZY0SMkDE+jwecyEEq5BcHC/8faBULcQWGVxMHqdhgutkSyrvNQXBJUJk5 CMdQ==
X-Received by 10.50.30.6 with SMTP id o6mr10238703igh.94.1447878564579; Wed, 18 Nov 2015 12:29:24 -0800 (PST)
In-Reply-To <n2iete$js9$1@news2.informatik.uni-stuttgart.de>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:98997

Show key headers only | View raw


On Thu, Nov 19, 2015 at 5:09 AM, Ulli Horlacher
<framstag@rus.uni-stuttgart.de> wrote:
> Chris Angelico <rosuav@gmail.com> wrote:
>
>> > As I am Python newbie I have not quite understood the Python character
>> > encoding scheme :-}
>> >
>> > Where can I find a good introduction of this topic?
>>
>> Here are a couple of articles on the basics of Unicode:
>>
>> http://www.joelonsoftware.com/articles/Unicode.html
>
> I do Unicode programming for over 20 years. So, I do have a basic
> understanding of it. I am just new to Python.

Ah, okay. When you said you didn't understand the character encoding
scheme, I thought you meant Unicode itself. In any case, I make no
apology for recommending those two articles to people... at very worst
you already know that stuff :)

>> http://nedbatchelder.com/text/unipain.html
>
> Thanks. I will read it.

That's a great talk, and has the coolness of having zero pictures on
its slides. I love it.

>> If you can use Python 3
>
> I cannot use it, because the Python compiler pyinstaller does not work
> with it on Windows:
>
> S:\python>pyinstaller.exe --onefile tk.py
> Traceback (most recent call last):
>   File "C:\Python35\Scripts\pyinstaller-script.py", line 9, in <module>
>     load_entry_point('PyInstaller==3.0', 'console_scripts', 'pyinstaller')()
>   File "c:\python35\lib\site-packages\pkg_resources\__init__.py", line 558, in l
> oad_entry_point
>     return get_distribution(dist).load_entry_point(group, name)
>   File "c:\python35\lib\site-packages\pkg_resources\__init__.py", line 2682, in
> load_entry_point
>     return ep.load()
>   File "c:\python35\lib\site-packages\pkg_resources\__init__.py", line 2355, in
> load
>     return self.resolve()
>   File "c:\python35\lib\site-packages\pkg_resources\__init__.py", line 2361, in
> resolve
>     module = __import__(self.module_name, fromlist=['__name__'], level=0)
>   File "c:\python35\lib\site-packages\PyInstaller\__main__.py", line 21, in <mod
> ule>
>     import PyInstaller.building.build_main
>   File "c:\python35\lib\site-packages\PyInstaller\building\build_main.py", line
> 31, in <module>
>     from ..depend import bindepend
>   File "c:\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 40,
>  in <module>
>     from ..utils.win32.winmanifest import RT_MANIFEST
>   File "c:\python35\lib\site-packages\PyInstaller\utils\win32\winmanifest.py", l
> ine 97, in <module>
>     from PyInstaller.utils.win32 import winresource
>   File "c:\python35\lib\site-packages\PyInstaller\utils\win32\winresource.py", l
> ine 20, in <module>
>     import pywintypes
>   File "c:\python35\lib\site-packages\win32\lib\pywintypes.py", line 124, in <mo
> dule>
>     __import_pywin32_system_module__("pywintypes", globals())
>   File "c:\python35\lib\site-packages\win32\lib\pywintypes.py", line 64, in __im
> port_pywin32_system_module__
>     import _win32sysloader
> ImportError: DLL load failed: The specified module could not be found.
>
>
> With python 2.7, pyinstaller runs without problems.

Hmm. That's a separate consideration. If you take a step back and ask
the broader question "How can I package my Python 3.5 script into a
.exe file?", I'm pretty sure there is an answer; maybe pyinstaller
isn't the way to do it. (I'm not an expert on exe file production.)
Does your script run happily in 3.5 if it isn't packaged into an exe?

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

handling of non-ASCII filenames? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-18 16:45 +0000
  Re: handling of non-ASCII filenames? Chris Angelico <rosuav@gmail.com> - 2015-11-19 03:54 +1100
    Re: handling of non-ASCII filenames? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-18 18:09 +0000
      Re: handling of non-ASCII filenames? Chris Angelico <rosuav@gmail.com> - 2015-11-19 07:29 +1100
        Re: handling of non-ASCII filenames? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-18 22:37 +0000
  Re: handling of non-ASCII filenames? Christian Gollwitzer <auriocus@gmx.de> - 2015-11-18 18:22 +0100
    Re: handling of non-ASCII filenames? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-19 07:54 +0000
      Re: handling of non-ASCII filenames? Christian Gollwitzer <auriocus@gmx.de> - 2015-11-19 09:16 +0100

csiph-web