Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69620
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Subject | Re: Two Questions about Python on Windows |
| Date | 2014-04-03 23:57 +0100 |
| References | <lhk4el$91k$1@news.albasani.net> <CALwzidmpCpLrR=0J+D1isKW_9kGeE=UyM3Q_wqm7xitHeRSCfg@mail.gmail.com> <lhkfhd$1jv$1@ger.gmane.org> <CALwzidkqLkzL9bywLJJpqQEDkxt4cbVFGpOo6JOCLySCZKaZaw@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.8865.1396565869.18130.python-list@python.org> (permalink) |
On 03/04/2014 23:41, Ian Kelly wrote: > On Thu, Apr 3, 2014 at 2:15 PM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: >> On 03/04/2014 18:54, Ian Kelly wrote: >>> >>> >>> On Apr 3, 2014 11:12 AM, "Walter Hurry" <walterhurry@gmail.com >>> <mailto:walterhurry@gmail.com>> wrote: >>> > >>> > Normally my Python development is done on FreeBSD and Linux. I know >>> that on *ix I simply have to make foo.py executable (the shebang line is >>> present, of course) to make it runnable. >>> > >>> > For my son's school assignment, I have to help him with Python for >>> Windows. >>> > >>> > As I understand it, on Windows a .py file is not executable, so I >>> need to run 'python foo py', or use a .pyw file. >>> > >>> > Question 1: Do I make a .pyw file simply by copying or renaming >>> foo.py to foo.pyw? >>> >>> Yes. The only distinction between .py and .pyw is that the Python >>> installer associates the former with Python.exe and the latter with >>> Pythonw.exe. Pythonw runs the script without creating a console window >>> for stdin/stdout. >>> >> >> Not with more modern versions of Python. >> >> c:\Users\Mark>assoc .py >> .py=Python.File >> >> c:\Users\Mark>ftype Python.File >> Python.File="C:\Windows\py.exe" "%1" %* > > Which ultimately calls some version of python.exe. > >> c:\Users\Mark>assoc .pyw >> .pyw=Python.NoConFile >> >> c:\Users\Mark>ftype Python.NoConFile >> Python.NoConFile="C:\Windows\pyw.exe" "%1" %* > > Which ultimately calls some version of pythonw.exe. > > I elided that detail because it wasn't relevant to the question at hand. > Yes, I regretted how badly I worded the above the second I hit the send button. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Two Questions about Python on Windows Walter Hurry <walterhurry@gmail.com> - 2014-04-03 17:06 +0000
Re: Two Questions about Python on Windows maxerickson@gmail.com - 2014-04-03 10:31 -0700
Re: Two Questions about Python on Windows Tim Roberts <timr@probo.com> - 2014-04-05 14:57 -0700
Re: Two Questions about Python on Windows Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-03 11:54 -0600
Re: Two Questions about Python on Windows Terry Reedy <tjreedy@udel.edu> - 2014-04-03 14:34 -0400
Re: Two Questions about Python on Windows Ethan Furman <ethan@stoneleaf.us> - 2014-04-03 11:00 -0700
Re: Two Questions about Python on Windows Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-03 21:15 +0100
Re: Two Questions about Python on Windows Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-03 16:41 -0600
Re: Two Questions about Python on Windows Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-03 23:57 +0100
csiph-web