Steven D'Aprano writes:
> When working with Windows paths, you should make a habit of either
> escaping every backslash:
>
> u"c:\\automation_common\\Python\\TestCases\\list_dir_script.txt"
>
> using a raw-string:
>
> ur"c:\automation_common\Python\TestCases\list_dir_script.txt"
>
> or j
On 4 April 2014 12:16, Chris Angelico wrote:
> On Fri, Apr 4, 2014 at 11:15 AM, David wrote:
>> On 4 April 2014 01:17, Chris Angelico 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 -na
On Fri, Apr 4, 2014 at 11:15 AM, David wrote:
> On 4 April 2014 01:17, Chris Angelico 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
On 4 April 2014 01:17, Chris Angelico 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 need to f
On Fri, Apr 4, 2014 at 5:41 AM, Terry Reedy wrote:
> On 4/2/2014 11:10 PM, Chris Angelico wrote:
>>
>> On Thu, Apr 3, 2014 at 1:37 PM, Steven D'Aprano
>> wrote:
>>>
>>> Windows accepts both forward and backslashes in file names.
>>
>>
>> Small clarification: The Windows *API* accepts both types o
On 4/2/2014 11:10 PM, Chris Angelico wrote:
On Thu, Apr 3, 2014 at 1:37 PM, Steven D'Aprano 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 open a file using for
On Fri, Apr 4, 2014 at 12:57 AM, 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 shell - because
Marko Rauhamaa wrote:
> Chris Angelico :
>
>> 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 m
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
Chris Angelico :
> 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 *users*
> prefer ba
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 =
> [u"c:\automation_common\Python
On Thu, Apr 3, 2014 at 1:37 PM, Steven D'Aprano 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* are aware of this (
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 =
> [u"c:\automation_common\Py
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 = [u"c:\automation_common\Python\TestCases\list_dir_script.txt"]
for curr_test in All_Tests:
14 matches
Mail list logo