Path: csiph.com!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: eryk sun Newsgroups: comp.lang.python Subject: Re: extending PATH on Windows? Date: Fri, 19 Feb 2016 12:04:29 -0600 Lines: 52 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de jL0BQeTkzty0YX6LhxHthwUme0deulW+1usquotF7lPA== Return-Path: 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; 'context': 0.05; '(especially': 0.07; 'matches': 0.07; 'url:msdn': 0.07; 'subject:Windows': 0.09; '[1]:': 0.09; 'debugger': 0.09; 'runtime': 0.09; 'string)': 0.09; 'output': 0.13; 'translate': 0.15; '2016': 0.16; '[1].': 0.16; 'angle': 0.16; 'brackets,': 0.16; 'breakpoint': 0.16; 'dot,': 0.16; 'locations.': 0.16; 'mapped': 0.16; 'mark,': 0.16; 'mov': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wildcards': 0.16; 'wrote:': 0.16; 'string,': 0.18; 'thanks.': 0.18; '>>>': 0.20; 'library': 0.20; 'windows': 0.20; 'to:name:python-list@python.org': 0.20; 'am,': 0.23; 'feb': 0.23; 'matching': 0.23; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'command': 0.26; 'chris': 0.26; 'fri,': 0.27; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; 'dos': 0.27; 'sequence': 0.27; 'function': 0.28; "skip:' 10": 0.28; 'values': 0.28; 'character': 0.29; 'open': 0.33; 'file': 0.34; 'received:google.com': 0.35; 'dir': 0.35; 'instead': 0.36; 'there': 0.36; 'received:209.85': 0.36; '(i.e.': 0.36; 'cases': 0.36; 'url:library': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'files': 0.38; 'or,': 0.38; 'end': 0.39; 'to:addr:python.org': 0.40; 'more': 0.63; 'url:en-us': 0.72; 'special': 0.73; 'carried': 0.76; 'asterisk': 0.84; 'url:auth': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=wT5RaWM7szeBiTzoq2BcjkkDtMX6S+sSMuaLz2ZrHao=; b=RFn+SsR++WoY4XyY1jBiT6T1hjpndyDinfYZVt2zkCrpJJXUkIRWvaRzfwczehWXz+ uuGQGr0/nAdUpeowIrVMfagfI/GKhtohoGTaiZHoFJd2dQGAbe80/a1pQSzEhDb1sETm MHsdzTRODygf7KE/IJsaEhkecVp/+mMOkJc3mZsvzEcnjsR9dMgFcHimIA9EmloNYVeL 0KfG9tkuj91qQ+MNomeRNEWkoVn2ddV3KMgmPMd6KKxeOM+F1lT8B339q5czKyviWJPp bGe4bWqRrIYs139oQlKtNbQfLEFtBDIkiKqxApXLC+zyZ0IHfMuQFv5aGgI06QnG0F37 CDvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=wT5RaWM7szeBiTzoq2BcjkkDtMX6S+sSMuaLz2ZrHao=; b=mAMgysbLacDEJ6PogrBrNknGKydRL79AvXxnpMEhakPUopc6zN97cPGmSZnIIeYCXn 0en+mYtpUFgEEKiWiAF9eknW9nNUAuzSUYqvNaJo7e3m+lIDTdY+N2pNVzyC4XQC/1BY vJFlcDXBSWHeyG6vKP22yTc8rZ5eZqJR+7q1pofoeCvOURxKolqi2+E5F1vWwRU9phmJ ZUmXrcZzbEluplYTzje1aeosGHqS4LP/mQwtVc5Bt3XxUVOf7/h7jeYEbxArJCxhowAf KWPL4oc3s3WYkypofaod+SvCN8NSBf2x2t5KAOK4/LvQCWzjlbL0GrUJUJTN7RPxpG1U 4rvw== X-Gm-Message-State: AG10YORoecDCa1tbDrsB+plI77FpudaZctpgZ8tBrMpaqwQ3VAMebUn6wiQeB0jTa7BFEX5AXlX/HjjAQ2rPKg== X-Received: by 10.50.61.210 with SMTP id s18mr4300775igr.55.1455905109855; Fri, 19 Feb 2016 10:05:09 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103209 On Fri, Feb 19, 2016 at 4:48 AM, Chris Angelico wrote: > On Fri, Feb 19, 2016 at 9:42 PM, Ulli Horlacher > wrote: >> pyotr filipivich wrote: >> >>> > Windows (especially 7) search function is highly crippled. There is >>> >some command sequence that will open it up to looking at other file types >>> >and locations. >>> > >>> >http://answers.microsoft.com/en-us/windows/forum/windows_7-files/windows-7-search-does-not-find-files-that-it/61b88d5e-7df7-4427-8a2e-82b801a4a746?auth=1 >>> >>> >>> Thanks. I've found it "simpler" to just open a command prompt, and >>> use DOS. >> >> How can one search for files with DOS? > > dir /s /b \*add2path.* This search is carried out by Windows NT instead of MS-DOS in almost all cases nowadays: Z:\Python\repo\2.7>dir /s /b Tools\Scripts\win_add?*.* Breakpoint 0 hit ntdll!NtQueryDirectoryFile: 00007ffb`d9d138c0 4c8bd1 mov r10,rcx 0:000> dS poi(@rsp + a*8) 000000df`bab1ff9a "win_add><"*" NT has normal (i.e. sane) * and ? wildcard matching, so WinAPI FindFirstFile has to translate DOS wildcards to special values before calling NtQueryDirectoryFile. See the file-system runtime library function FsRtlIsNameInExpression [1]. Dot, question mark, and asterisk may be mapped (depending on context in the string) to double quote and the angle brackets, as shown in the above debugger output in which 'win_add?*.*' is passed to the system call as 'win_add><"*'. DOS_DOT (") Matches either a period or zero characters beyond the name string. DOS_QM (>) Matches any single character or, upon encountering a period or end of name string, advances the expression to the end of the set of contiguous DOS_QMs. DOS_STAR (<) Matches zero or more characters until encountering and matching the final . in the name. [1]: https://msdn.microsoft.com/en-us/library/ff546850