Path: csiph.com!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:42:41 -0600 Lines: 55 Message-ID: References: <56C72420.8020607@yahoo.no> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 0WqoeBASsFB1iL3PlPLSVAhDGdmoiU3jMsoWFtSoN6Pg== Return-Path: X-Original-To: python-list@mail.python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.040 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'matches': 0.07; 'skip:% 20': 0.07; 'subject:Windows': 0.09; 'imho.': 0.09; '-name': 0.16; '2016': 0.16; 'cool.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'try:': 0.18; 'variable': 0.18; '>>>': 0.20; 'windows': 0.20; 'am,': 0.23; 'feb': 0.23; "python's": 0.23; 'header:In-Reply-To:1': 0.24; 'skip:" 20': 0.26; 'fri,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'environment': 0.29; '(c)': 0.29; 'another': 0.32; '2009': 0.34; 'list': 0.34; 'received:google.com': 0.35; 'skip:c 30': 0.35; 'dir': 0.35; 'installing': 0.35; 'path': 0.35; 'but': 0.36; 'tool': 0.36; 'received:209.85': 0.36; 'url:library': 0.36; 'to:addr:python- list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'integration': 0.38; 'received:209': 0.38; 'skip:p 20': 0.38; 'someone': 0.38; 'files': 0.38; 'some': 0.40; 'your': 0.60; 'more': 0.63; 'skip:$ 10': 0.67; 'reserved.': 0.67; 'url:en-us': 0.72; 'special': 0.73; 'chrisa': 0.84; 'directory:': 0.84; 'dennis': 0.91; 'more?': 0.91 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=ay/gCplNb0BCY2PjknpKbEuGDPqRH+IXPILyp1nEfh4=; b=ZZLgbMvjLOMMhKcSw50FB1onDQJyRBsuk/7f7l/PzJLAN5xjivE7e8t2iFPVWzI1Ti F12d298D9nt4n2/S5EqDTdd/lwXndTdJLFD6/n660rE86UaQk+wcIo67IH5sDoUV+TEy 7v/6SyOgofP1bfhAj48zGsXSL75j1XDooPVRc0jWiHyOp/apUQsGisHbKMixX7KwlldU Yj0TZVaTDK7ULED62/kA4sKnwHD6frs5ztzsKJv+n5Dul8kUDCx49AAQqP68DDXXKIG0 UylocXRmj+TFcqVm/bYjFhdBXmLtv4ZQV1hP1sp58hG2wWJpNVSU4XhYgRd5Io6ZVqlW DFdA== 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=ay/gCplNb0BCY2PjknpKbEuGDPqRH+IXPILyp1nEfh4=; b=ZD0GospLuQZSbjgTifiItA0/c4ijPH4O4YVoPvCcOxAjq7EI41LKcXMVIWe4qSUxyA alFkJBZjs4W8Mf9Rs6GNVKb4kiydkSt7xTk1dABl6qO7oio9Qd9o5fp89dEaJLpwrkNC n60juc/Ss1fFdEl/ruZIVx1R2VMhqI5xePqjQ8d04kgslGr4MdAVuhKKhRiATdjSVH8h VcZcpBhNPG+gEnz6M4cozP3psu+IUgnLtVK6FmyBuKjIKH9qQq6nuN1xOOLI8LtibqD+ 5osDY0vaZaAorBmr1vJ+/6fNgMXlCEazv4GZcDplKX5DZFhXbynLvtWGQfAGagT6kkqu ysMg== X-Gm-Message-State: AG10YOROxbgh3/tgcTdmwZT6GuMCJOscDZSXxT4UAic+w0iiZ2GTcFfvaRBJ+c1yq1OoJUNi6xpi0sSus3LF0Q== X-Received: by 10.50.66.238 with SMTP id i14mr3203320igt.74.1455907401643; Fri, 19 Feb 2016 10:43:21 -0800 (PST) In-Reply-To: <56C72420.8020607@yahoo.no> 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:103219 On Fri, Feb 19, 2016 at 8:18 AM, Gisle Vanem wrote: > Dennis Lee Bieber wrote: > >>>> How can one search for files with DOS? >>> >>> dir /s /b \*add2path.* >>> >>> ChrisA >> >> Or move to PowerShell... >> >> Windows PowerShell >> Copyright (C) 2009 Microsoft Corporation. All rights reserved. >> >> PS C:\Users\Wulfraed\Documents> Get-ChildItem -Path c:\ -Filter *add2path* >> -Name -Recurse > > Clumsy IMHO. Try: > c:\> envtool --path *ipython* > > Matches in %PATH: Your tool has special integration with Python's search paths, which is cool. But for someone that wants some of these features without installing another program and without learning PowerShell, where.exe may suffice: https://technet.microsoft.com/en-us/library/cc753148 Search PATH and the current directory: C:\>where kd C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\kd.exe Search an environment variable that may contain one or more directories: C:\>set MYPATH=^ More? %SystemRoot%\System32;^ More? %SystemRoot%\System32\drivers C:\>where $MYPATH:conhost*.* C:\Windows\System32\conhost.exe C:\Windows\System32\ConhostV1.dll C:\Windows\System32\ConhostV2.dll Search a list of directories: C:\>where "%MYPATH%":con*.sys C:\Windows\System32\drivers\condrv.sys Recursively search a directory: C:\>where /r "%LocalAppData%\Programs" python.exe C:\Users\Administrator\AppData\Local\Programs\Python\ Python35-32\python.exe