Steven D'Aprano st...@pearwood.info writes:
When working with Windows paths, you should make a habit of either
escaping every backslash:
uc:\\automation_common\\Python\\TestCases\\list_dir_script.txt
using a raw-string:
urc:\automation_common\Python\TestCases\list_dir_script.txt
On Wed, 02 Apr 2014 16:27:04 -0700, Steve wrote:
Hi All,
I'm in need of some encoding/decoding help for a situation for a Windows
Path that contains Unicode characters in it.
CODE
import os.path import codecs import sys
All_Tests =
Chris Angelico ros...@gmail.com:
Small clarification: The Windows *API* accepts both types of slash
(you can open a file using forward slashes, for instance), but not all
Windows *applications* are aware of this (generally only
cross-platform ones take notice of this), and most Windows
On Thu, Apr 3, 2014, at 5:00, Marko Rauhamaa wrote:
In fact, proper dealing with punctuation in pathnames is one of the main
reasons to migrate to Python from bash. Even if it is often possible to
write bash scripts that handle arbitrary pathnames correctly, few script
writers are pedantic
Marko Rauhamaa wrote:
Chris Angelico ros...@gmail.com:
Small clarification: The Windows *API* accepts both types of slash
(you can open a file using forward slashes, for instance), but not all
Windows *applications* are aware of this (generally only
cross-platform ones take notice of
On Fri, Apr 4, 2014 at 12:57 AM, random...@fastmail.us wrote:
An argument [in a position where a list of filenames is expected] with *
or ? in it _always_ gets globbed, so C:\dir with spaces\*.txt can be
used. This is part of the reason the program is responsible for globbing
rather than the
On 4/2/2014 11:10 PM, Chris Angelico wrote:
On Thu, Apr 3, 2014 at 1:37 PM, Steven D'Aprano st...@pearwood.info wrote:
Windows accepts both forward and backslashes in file names.
Small clarification: The Windows *API* accepts both types of slash
To me, that is what Steven said.
(you can
On Fri, Apr 4, 2014 at 5:41 AM, Terry Reedy tjre...@udel.edu wrote:
On 4/2/2014 11:10 PM, Chris Angelico wrote:
On Thu, Apr 3, 2014 at 1:37 PM, Steven D'Aprano st...@pearwood.info
wrote:
Windows accepts both forward and backslashes in file names.
Small clarification: The Windows *API*
On 4 April 2014 01:17, Chris Angelico ros...@gmail.com wrote:
-- Get info on all .pyc files in a directory and all its subdirectories --
C:\dir some_directory\*.pyc /s
$ ls -l `find some_directory -name \*.pyc`
Except that the ls version there can't handle names with spaces in
them, so you
On Fri, Apr 4, 2014 at 11:15 AM, David bouncingc...@gmail.com wrote:
On 4 April 2014 01:17, Chris Angelico ros...@gmail.com wrote:
-- Get info on all .pyc files in a directory and all its subdirectories --
C:\dir some_directory\*.pyc /s
$ ls -l `find some_directory -name \*.pyc`
Except that
On 4 April 2014 12:16, Chris Angelico ros...@gmail.com wrote:
On Fri, Apr 4, 2014 at 11:15 AM, David bouncingc...@gmail.com wrote:
On 4 April 2014 01:17, Chris Angelico ros...@gmail.com wrote:
-- Get info on all .pyc files in a directory and all its subdirectories --
C:\dir
On Wed, 02 Apr 2014 16:27:04 -0700, Steve wrote:
Hi All,
I'm in need of some encoding/decoding help for a situation for a Windows
Path that contains Unicode characters in it.
CODE
import os.path
import codecs
import sys
All_Tests =
On Thu, Apr 3, 2014 at 1:37 PM, Steven D'Aprano st...@pearwood.info wrote:
Windows accepts both forward and backslashes in file names.
Small clarification: The Windows *API* accepts both types of slash
(you can open a file using forward slashes, for instance), but not all
Windows *applications*
13 matches
Mail list logo