On Fri, Feb 19, 2016 at 6:57 PM, Dennis Lee Bieber
wrote:
>
> Problem -- if the OP's PATH had contained the location of the add2path
> script, the OP might not have needed to search for it... (presuming their
> configuration also was set up to treat .py files as executable, entering
> win_
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.
On Thu, Feb 18, 2016 at 10:55 AM, Ulli Horlacher
wrote:
> Ulli Horlacher wrote:
>
>> > but simpler still and more reliable to just call QueryValueEx.
>>
>> I find it more complicated.
>
> I have now (after long studying docs and examples)::
>
> def get_winreg(key,subkey):
> try:
> rkey = wi
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
Ulli Horlacher on Fri, 19 Feb 2016
10:42:52 + (UTC) typed in comp.lang.python the following:
>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 locatio
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:\ -Filt
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/
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-fi
Dennis Lee Bieber on Thu, 18 Feb 2016 21:57:13
-0500 typed in comp.lang.python the following:
>On Thu, 18 Feb 2016 16:24:00 + (UTC), Ulli Horlacher
> declaimed the following:
>
>>Dennis Lee Bieber wrote:
>>
>>> >I have
>>> >"Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC
>
Ulli Horlacher wrote:
> > but simpler still and more reliable to just call QueryValueEx.
>
> I find it more complicated.
I have now (after long studying docs and examples)::
def get_winreg(key,subkey):
try:
rkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER,key,0,winreg.KEY_READ)
rvalue,
eryk sun wrote:
> https://hg.python.org/cpython/file/v2.7.11/Tools/scripts/win_add2path.py
>
> But there are a few issues with this script.
(... lot of flaws ...)
> Here's a new version for Python 2. I generalized the shell-variable
> replacement to a list of well-known folders.
Great script
Dennis Lee Bieber wrote:
> >I have
> >"Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC
> >v.1500 32 bit (Intel)] on win32"
> >and there is no "win_add2path.py"
> >
> C:\Python_x64\Python27\Tools\scripts\win_add2path.py
Ok, It is here in C:\Python27\Tools\scripts\win_add2path.py
On Wed, Feb 17, 2016 at 6:53 PM, Dennis Lee Bieber
wrote:
> On Wed, 17 Feb 2016 17:49:11 + (UTC), Ulli Horlacher
> declaimed the following:
>
>>Thorsten Kampe wrote:
>>
>>> By the way: there is a script called `win_add2path.py` in your Python
>>> distribution
>>
>>I have
>>"Python 2.7.11 (v2
eryk sun wrote:
> >> The AutoRun command (it's a command line, not a script path)
> >
> > A script path is a legal command line, too.
>
> If the registry value were just a script path, you'd have to modify
> your script to chain to the previous script, if any. Since it's a
> command line you can
On Wed, Feb 17, 2016 at 2:29 PM, Ulli Horlacher
wrote:
> eryk sun wrote:
>> >
>> > set PATH=%PATH%;%USERPROFILE%\Desktop
>>
>> The AutoRun command (it's a command line, not a script path)
>
> A script path is a legal command line, too.
If the registry value were just a script path, you'd have to
eryk sun wrote:
> > At startup cmd.exe runs a script which is defined by the registry variable
> > AutoRun in "HKCU\Software\Microsoft\Command Processor"
> >
> > I set this variable with:
> >
> > rc = "HKCU\Software\Microsoft\Command Processor"
> > ar = "%USERPROFILE%\Desktop\autorun.cmd"
> >
On Wed, Feb 17, 2016 at 11:49 AM, Ulli Horlacher
wrote:
> At startup cmd.exe runs a script which is defined by the registry variable
> AutoRun in "HKCU\Software\Microsoft\Command Processor"
>
> I set this variable with:
>
> rc = "HKCU\Software\Microsoft\Command Processor"
> ar = "%USERPROFILE%
Thorsten Kampe wrote:
> By the way: there is a script called `win_add2path.py` in your Python
> distribution
I have
"Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC
v.1500 32 bit (Intel)] on win32"
and there is no "win_add2path.py"
But I found another solution:
I need the ex
* Ulli Horlacher (Tue, 16 Feb 2016 12:38:44 + (UTC))
By the way: there is a script called `win_add2path.py` in your Python
distribution which "is a simple script to add Python to the Windows
search path. It modifies the current user (HKCU) tree of the
registry.". That should do most of what
* Ulli Horlacher (Tue, 16 Feb 2016 12:38:44 + (UTC))
>
> Thorsten Kampe wrote:
> > * Ulli Horlacher (Tue, 16 Feb 2016 08:30:59 + (UTC))
> > > I need to extend the PATH environment variable on Windows.
> >
> > 1. Add the path component yourself into HKEY_CURRENT_USER and make
> > sure it
On Tue, Feb 16, 2016 at 2:30 AM, Ulli Horlacher
wrote:
>
> So far, I use:
>
>system('setx PATH "%PATH%;'+bindir+'"')
>
> The problem: In a new process (cmd.exe) PATH contains a lot of double
> elements. As far as I have understood, Windows builds the PATH
> environment variable from a system c
Thorsten Kampe wrote:
> * Ulli Horlacher (Tue, 16 Feb 2016 08:30:59 + (UTC))
> > I need to extend the PATH environment variable on Windows.
>
> 1. Add the path component yourself into HKEY_CURRENT_USER and make
> sure it's not there already (pure Python).
Preferred!
What is HKEY_CURRENT_USE
* Ulli Horlacher (Tue, 16 Feb 2016 08:30:59 + (UTC))
> I need to extend the PATH environment variable on Windows.
>
> So far, I use:
>
>system('setx PATH "%PATH%;'+bindir+'"')
>
> The problem: In a new process (cmd.exe) PATH contains a lot of double
> elements. As far as I have understoo
I need to extend the PATH environment variable on Windows.
So far, I use:
system('setx PATH "%PATH%;'+bindir+'"')
The problem: In a new process (cmd.exe) PATH contains a lot of double
elements. As far as I have understood, Windows builds the PATH
environment variable from a system component a
24 matches
Mail list logo