Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49755

Re: How to tell Script to use pythonw.exe ?

References <a4d1d0ff-2619-42da-b7f2-4ef1ac10e549@googlegroups.com> <fefcda83-f176-4e7b-9d30-674be9f02a30@googlegroups.com> <l977t817a1ap04075g0bp5iiq9978ev3ie@4ax.com> <kr1fke$d5j$2@news.grnet.gr>
Date 2013-07-03 09:36 -0700
Subject Re: How to tell Script to use pythonw.exe ?
From Benjamin Kaplan <benjamin.kaplan@case.edu>
Newsgroups comp.lang.python
Message-ID <mailman.4179.1372869803.3114.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Jul 3, 2013 8:27 AM, "Νίκος" <nikos@superhost.gr> wrote:
>
> Στις 3/7/2013 6:43 πμ, ο/η Tim Roberts έγραψε:
>
>> goldtech <leegold@operamail.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 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 the
>> 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=Python
>>
>> C:\tmp>ftype Python
>> Python="C:\Apps\Python27\Python.exe" "%1" %*
>>
>> C:\tmp>assoc .pyw
>> .pyw=Python.NoConFile
>>
>> C:\tmp>ftype Python.NoConFile
>> Python.NoConFile="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=Python.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=Chrome
> .html=Chrome
>
> C:\Windows\system32>ftype
Chrome="C:\Users\Ferrous\AppData\Local\Google\Chrome\Application\chrome.exe"
%1
>
>
Chrome="C:\Users\Ferrous\AppData\Local\Google\Chrome\Application\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 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to tell Script to use pythonw.exe ? goldtech <leegold@operamail.com> - 2013-07-02 18:20 -0700
  Re: How to tell Script to use pythonw.exe ? goldtech <leegold@operamail.com> - 2013-07-02 18:28 -0700
    Re: How to tell Script to use pythonw.exe ? Tim Roberts <timr@probo.com> - 2013-07-02 20:43 -0700
      Re: How to tell Script to use pythonw.exe ? Νίκος <nikos@superhost.gr> - 2013-07-03 18:22 +0300
        Re: How to tell Script to use pythonw.exe ? Νίκος <nikos@superhost.gr> - 2013-07-03 19:50 +0300
          Re: How to tell Script to use pythonw.exe ? alex23 <wuwei23@gmail.com> - 2013-07-04 11:28 +1000
        Re: How to tell Script to use pythonw.exe ? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-07-03 09:36 -0700
  Re: How to tell Script to use pythonw.exe ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-03 01:29 +0000
  Re: How to tell Script to use pythonw.exe ? Andrew Berg <robotsondrugs@gmail.com> - 2013-07-02 20:34 -0500
  DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Tim Golden <mail@timgolden.me.uk> - 2013-07-03 08:34 +0100
  Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Chris Angelico <rosuav@gmail.com> - 2013-07-03 17:41 +1000
  Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Andrew Berg <robotsondrugs@gmail.com> - 2013-07-03 03:28 -0500
  Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Tim Golden <mail@timgolden.me.uk> - 2013-07-03 09:51 +0100
  Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Tim Chase <python.list@tim.thechases.com> - 2013-07-03 07:50 -0500
  Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Tim Golden <mail@timgolden.me.uk> - 2013-07-03 14:00 +0100
    Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-03 13:19 +0000
      Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Jeff Schwab <jeff@schwabcenter.com> - 2013-07-03 09:22 -0400
      Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-07-03 18:11 -0400
      Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-03 17:35 -0600
      Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Wayne Werner <wayne@waynewerner.com> - 2013-07-04 09:08 -0500
      Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Andrew Berg <robotsondrugs@gmail.com> - 2013-07-04 17:12 -0500
      Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Chris Angelico <rosuav@gmail.com> - 2013-07-05 08:39 +1000
  Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] Chris Angelico <rosuav@gmail.com> - 2013-07-04 00:00 +1000

csiph-web