Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'true,': 0.05; 'executed': 0.09; 'http': 0.09; 'method:': 0.09; 'skip:c 80': 0.09; 'subject:How': 0.10; 'python': 0.11; 'windows': 0.15; '>>': 0.16; '.py': 0.16; 'box:': 0.16; 'extension,': 0.16; 'handler.': 0.16; 'popping': 0.16; 'to:name:python list': 0.16; '\xc2\xa0if': 0.16; 'files.': 0.16; 'subject: ?': 0.16; 'wrote:': 0.18; 'skip:p 40': 0.19; 'command': 0.22; '>>>': 0.22; '>>>': 0.24; 'skip:c 70': 0.24; 'tells': 0.24; 'script': 0.25; '>': 0.26; 'designated': 0.26; 'extension': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'skip:p 30': 0.29; 'am,': 0.29; 'tim': 0.29; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'requests': 0.31; 'own,': 0.31; 'file': 0.32; 'run': 0.32; 'open': 0.33; 'url:python': 0.33; 'received:209.85': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; "didn't": 0.36; 'url:org': 0.36; 'received:209': 0.37; 'server': 0.38; 'skip:& 10': 0.38; 'skip:. 20': 0.38; 'to:addr :python-list': 0.38; 'files': 0.38; 'ability': 0.39; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; 'changed': 0.39; 'url:mail': 0.40; 'read': 0.60; 'first': 0.61; '8bit%:92': 0.71; 'jul': 0.74; 'click': 0.77; '8bit%:45': 0.84; 'associations': 0.84; "browser's": 0.84; 'subject:tell': 0.84; 'shell,': 0.91; 'why?': 0.91; 'anywhere,': 0.93; '2013': 0.98 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=INq6mbowVRMnRosIcIWERXJytpsGr45djrg6Q3n3ytE=; b=BXVQKFVKH30sye1ZDM10C2vj/nCX8+9m7eMDqaG1L8G2MqonhU5czcWyf+0/MKzoQG IKJ26hLzXuKMW/zsRHtbQ8H7d8P544b4RyGvgCdMRhzgCyEVqQ70ESteXlql+7VZnG/V kf+F84X1W/sVpGevVx8ROWBZsxrb3FhFPAWgmkCCdJUY+he+bqVswrxmnV4Uw5QgDICE UGEiW7uNKVuLm7EMb6DZbuNYMdScbzv4LoC6Wv1Q9sFNQ0ZUIlUjKrqSVvRz9v1i1zWU 0Lh5lRF86BbecLXzbUBs2hz4Qr4U6Yrf1HBuKucnRxP7tnf7Uswp0lFJTKRL6vvf0isA APHw== X-Received: by 10.60.56.82 with SMTP id y18mr1496876oep.86.1372869417884; Wed, 03 Jul 2013 09:36:57 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.56.82 with SMTP id y18mr1496865oep.86.1372869417674; Wed, 03 Jul 2013 09:36:57 -0700 (PDT) In-Reply-To: References: Date: Wed, 3 Jul 2013 09:36:57 -0700 Subject: Re: How to tell Script to use pythonw.exe ? From: Benjamin Kaplan To: Python List Content-Type: multipart/alternative; boundary=001a11c20b94f6bc3504e09e1191 X-Gm-Message-State: ALoCoQly8GTt5kq29rpnd2fWP5Mva/xeT/ttXIlVrMk4uBsKHaU+B7nq0R5kkTHrhaT6wyX40jn3cuIO18ahGRmNiFI2qkZvajzNDWhWTysz0AwnkDl/0u9cLGrMXT9sa7xFZvMUxwRibdADrYdgCGJgZXZMyBFXFg== X-Junkmail-Whitelist: YES (by domain whitelist at mpv1.tis.cwru.edu) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 158 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372869803 news.xs4all.nl 15966 [2001:888:2000:d::a6]:35230 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49755 --001a11c20b94f6bc3504e09e1191 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Jul 3, 2013 8:27 AM, "=CE=9D=CE=AF=CE=BA=CE=BF=CF=82" wrote: > > =CE=A3=CF=84=CE=B9=CF=82 3/7/2013 6:43 =CF=80=CE=BC, =CE=BF/=CE=B7 Tim Ro= berts =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > >> goldtech wrote: >>> >>> >>> I just changed the file extension of the script file from .py to .pyw >>> and it uses pythonw.exe. I didn't read it anywhere, just intuited it >>> and tried it. Python has some very smart people working the language... >> >> >> While your statement is true, that's not what happened here. >> >> Windows has long had the ability to associate a file extension with a >> handler. If you start a command shell, the "assoc" command tells you th= e >> program type associated with an extension, and the "ftype" command tells >> you the command line that will be executed for that program type. On my >> box: >> >> C:\tmp>assoc .py >> .py=3DPython >> >> C:\tmp>ftype Python >> Python=3D"C:\Apps\Python27\Python.exe" "%1" %* >> >> C:\tmp>assoc .pyw >> .pyw=3DPython.NoConFile >> >> C:\tmp>ftype Python.NoConFile >> Python.NoConFile=3D"C:\Apps\Python27\Pythonw.exe" "%1" %* >> >> You can create your own, if you want. If you want files with a .script >> extension to run PythonW, you can type: >> >> assoc .script=3DPython.NoConFile >> > My associations are broken, bt i only care for open web pages with Chrome instead of IE, so i sued your method: > > > C:\Windows\system32>assoc .html=3DChrome > .html=3DChrome > > C:\Windows\system32>ftype Chrome=3D"C:\Users\Ferrous\AppData\Local\Google\Chrome\Application\chrome.e= xe" %1 > > Chrome=3D"C:\Users\Ferrous\AppData\Local\Google\Chrome\Application\chrome.e= xe" %1 > > but still when i click a link IE keeps popping up isntead of Chrome. > Any ideas why? Because your links don't open files. They send requests to an http server for data. And IE is the program designated to send http requests. Just use the browser's "make this the default" button. > -- > What is now proved was at first only imagined > -- > http://mail.python.org/mailman/listinfo/python-list --001a11c20b94f6bc3504e09e1191 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Jul 3, 2013 8:27 AM, "=CE=9D=CE=AF=CE=BA=CE=BF=CF=82" <nikos@superhost.gr> wrote:
>
> =CE=A3=CF=84=CE=B9=CF=82 3/7/2013 6:43 =CF=80=CE=BC, =CE=BF/=CE=B7 Tim= Roberts =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5:
>
>> goldtech <leegold@oper= amail.com> wrote:
>>>
>>>
>>> I just changed the file extension of the script file from .py = to .pyw
>>> and it uses pythonw.exe. I didn't read it anywhere, just i= ntuited it
>>> and tried it. Python has some very smart people working the la= nguage...
>>
>>
>> While your statement is true, that's not what happened here. >>
>> Windows has long had the ability to associate a file extension wit= h a
>> handler. =C2=A0If you start a command shell, the "assoc"= command tells you the
>> program type associated with an extension, and the "ftype&quo= t; command tells
>> you the command line that will be executed for that program type. = =C2=A0On my
>> box:
>>
>> C:\tmp>assoc .py
>> .py=3DPython
>>
>> C:\tmp>ftype Python
>> Python=3D"C:\Apps\Python27\Python.exe" "%1" %*=
>>
>> C:\tmp>assoc .pyw
>> .pyw=3DPython.NoConFile
>>
>> C:\tmp>ftype Python.NoConFile
>> Python.NoConFile=3D"C:\Apps\Python27\Pythonw.exe" "= %1" %*
>>
>> You can create your own, if you want. =C2=A0If you want files with= a .script
>> extension to run PythonW, you can type:
>>
>> =C2=A0 =C2=A0 =C2=A0assoc .script=3DPython.NoConFile
>>
> My associations are broken, bt i only care for open web pages with Chr= ome instead of IE, so i sued your method:
>
>
> C:\Windows\system32>assoc .html=3DChrome
> .html=3DChrome
>
> C:\Windows\system32>ftype Chrome=3D"C:\Users\Ferrous\AppData\L= ocal\Google\Chrome\Application\chrome.exe" %1
>
> Chrome=3D"C:\Users\Ferrous\AppData\Local\Google\Chrome\Applicatio= n\chrome.exe" %1
>
> but still when i click a link IE keeps popping up isntead of Chrome. > Any ideas why?

Because your links don't open files. They send requests = to an http server for data. And IE is the program designated to send http r= equests. Just use the browser's "make this the default" butto= n.
> --
> What is now proved was at first only imagined
> --
> http:/= /mail.python.org/mailman/listinfo/python-list

--001a11c20b94f6bc3504e09e1191--