How to tell Script to use pythonw.exe ?

Νίκος nikos at superhost.gr
Wed Jul 3 12:50:14 EDT 2013


Στις 3/7/2013 7:36 μμ, ο/η Benjamin Kaplan έγραψε:
>
> On Jul 3, 2013 8:27 AM, "Νίκος" <nikos at superhost.gr
> <mailto:nikos at superhost.gr>> wrote:
>  >
>  > Στις 3/7/2013 6:43 πμ, ο/η Tim Roberts έγραψε:
>  >
>  >> goldtech <leegold at operamail.com <mailto:leegold at 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.

I dont understand you. I explicitly state via cmd to have the .html 
files opened with Chrome instead of IE.


Tried it with the way you said and evben with "open with.." but all that 
fails.

some seriosu damaged must have happened and assoc are refusing to change.


-- 
What is now proved was at first only imagined!



More information about the Python-list mailing list