Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #49688 > unrolled thread
| Started by | goldtech <leegold@operamail.com> |
|---|---|
| First post | 2013-07-02 18:20 -0700 |
| Last post | 2013-07-04 00:00 +1000 |
| Articles | 20 on this page of 23 — 14 participants |
Back to article view | Back to comp.lang.python
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
Page 1 of 2 [1] 2 Next page →
| From | goldtech <leegold@operamail.com> |
|---|---|
| Date | 2013-07-02 18:20 -0700 |
| Subject | How to tell Script to use pythonw.exe ? |
| Message-ID | <a4d1d0ff-2619-42da-b7f2-4ef1ac10e549@googlegroups.com> |
Hi, Using Windows.... I want to run a .py file script using pythonw.exe so the DOS box will not open. Is there a way from inside the script to say "run me with pythonw.exe and not python.exe"? Thanks
[toc] | [next] | [standalone]
| From | goldtech <leegold@operamail.com> |
|---|---|
| Date | 2013-07-02 18:28 -0700 |
| Message-ID | <fefcda83-f176-4e7b-9d30-674be9f02a30@googlegroups.com> |
| In reply to | #49688 |
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...
[toc] | [prev] | [next] | [standalone]
| From | Tim Roberts <timr@probo.com> |
|---|---|
| Date | 2013-07-02 20:43 -0700 |
| Message-ID | <l977t817a1ap04075g0bp5iiq9978ev3ie@4ax.com> |
| In reply to | #49691 |
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
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
[toc] | [prev] | [next] | [standalone]
| From | Νίκος <nikos@superhost.gr> |
|---|---|
| Date | 2013-07-03 18:22 +0300 |
| Message-ID | <kr1fke$d5j$2@news.grnet.gr> |
| In reply to | #49696 |
Στις 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? -- What is now proved was at first only imagined!
[toc] | [prev] | [next] | [standalone]
| From | Νίκος <nikos@superhost.gr> |
|---|---|
| Date | 2013-07-03 19:50 +0300 |
| Message-ID | <kr1ko7$ta4$2@news.grnet.gr> |
| In reply to | #49747 |
Στις 3/7/2013 7:36 μμ, ο/η Benjamin Kaplan έγραψε: > > On Jul 3, 2013 8:27 AM, "Νίκος" <nikos@superhost.gr > <mailto:nikos@superhost.gr>> wrote: > > > > Στις 3/7/2013 6:43 πμ, ο/η Tim Roberts έγραψε: > > > >> goldtech <leegold@operamail.com <mailto: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. 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!
[toc] | [prev] | [next] | [standalone]
| From | alex23 <wuwei23@gmail.com> |
|---|---|
| Date | 2013-07-04 11:28 +1000 |
| Message-ID | <kr2iov$hd0$1@dont-email.me> |
| In reply to | #49754 |
On 4/07/2013 2:50 AM, Νίκος wrote: > 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. This list is for discussing Python, not your concerns du jour with various operating systems. Please take this to comp.os.ms-windows.misc instead.
[toc] | [prev] | [next] | [standalone]
| From | Benjamin Kaplan <benjamin.kaplan@case.edu> |
|---|---|
| Date | 2013-07-03 09:36 -0700 |
| Message-ID | <mailman.4179.1372869803.3114.python-list@python.org> |
| In reply to | #49747 |
[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
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2013-07-03 01:29 +0000 |
| Message-ID | <51d37e90$0$29999$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #49688 |
On Tue, 02 Jul 2013 18:20:12 -0700, goldtech wrote: > Hi, > > Using Windows.... > > I want to run a .py file script using pythonw.exe so the DOS box will > not open. Is there a way from inside the script to say "run me with > pythonw.exe and not python.exe"? I don't believe so, because by the time the script is even opened, it is too late. I'm not an expert about Windows, but as I understand it, the process that occurs when you double-click the file is: * Windows inspects the file extension and sees it is .py * Windows checks the registry for the file extension association and finds python.exe * Windows calls python.exe with the path to the script as argument * finally python.exe opens the script. Instead, you can use .pyw as the file extension, which should do what you want. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Andrew Berg <robotsondrugs@gmail.com> |
|---|---|
| Date | 2013-07-02 20:34 -0500 |
| Message-ID | <mailman.4146.1372815287.3114.python-list@python.org> |
| In reply to | #49688 |
On 2013.07.02 20:20, goldtech wrote: > Using Windows.... > > I want to run a .py file script using pythonw.exe so the DOS box will not open. Is there a way from inside the script to say "run me with pythonw.exe and not python.exe"? Use the .pyw extension instead of .py. Also, just FYI, DOS is long dead, and is much, much different under the hood from the console subsystem in modern versions of Windows. -- CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 9.1
[toc] | [prev] | [next] | [standalone]
| From | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| Date | 2013-07-03 08:34 +0100 |
| Subject | DOS or not? [was Re: How to tell Script to use pythonw.exe ?] |
| Message-ID | <mailman.4151.1372836894.3114.python-list@python.org> |
| In reply to | #49688 |
On 03/07/2013 02:34, Andrew Berg wrote: > DOS is long > dead, and is much, much different under the hood from the console > subsystem in modern versions of Windows. While this is clearly true, it's by no means unusual for people to refer to the "DOS Box" or talk about "DOS commands" etc. even when they're quite well aware of the history of Windows and its Console subsystem. It's just quicker than saying "Console Window" or something. I mention this because it seems to get called out every time someone uses the term "DOS" on this and other Python lists and it can smack slightly of pedantry. TJG
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-07-03 17:41 +1000 |
| Subject | Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] |
| Message-ID | <mailman.4152.1372837277.3114.python-list@python.org> |
| In reply to | #49688 |
On Wed, Jul 3, 2013 at 5:34 PM, Tim Golden <mail@timgolden.me.uk> wrote: > On 03/07/2013 02:34, Andrew Berg wrote: >> DOS is long >> dead, and is much, much different under the hood from the console >> subsystem in modern versions of Windows. > > > While this is clearly true, it's by no means unusual for people to refer > to the "DOS Box" or talk about "DOS commands" etc. even when they're > quite well aware of the history of Windows and its Console subsystem. > It's just quicker than saying "Console Window" or something. > > I mention this because it seems to get called out every time someone > uses the term "DOS" on this and other Python lists and it can smack > slightly of pedantry. I would avoid the term "DOS Box" in reference to cmd.exe though, because DOSBox is an emulator. (Also because I have an OS/2 heritage, where a DOS Window is command.com in a virtual x86 windowed session, while an OS/2 Window is the native OS/2 command interpreter.) But in general usage, calling them "DOS commands" is sloppy but unambiguous. I wouldn't be concerned one way or the other. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Andrew Berg <robotsondrugs@gmail.com> |
|---|---|
| Date | 2013-07-03 03:28 -0500 |
| Subject | Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] |
| Message-ID | <mailman.4154.1372840125.3114.python-list@python.org> |
| In reply to | #49688 |
On 2013.07.03 02:34, Tim Golden wrote: > While this is clearly true, it's by no means unusual for people to refer > to the "DOS Box" or talk about "DOS commands" etc. even when they're > quite well aware of the history of Windows and its Console subsystem. > It's just quicker than saying "Console Window" or something. > > I mention this because it seems to get called out every time someone > uses the term "DOS" on this and other Python lists and it can smack > slightly of pedantry. It's not as ambiguous (or as common) as it used to be, but it has always bothered me when someone refers to the Win32 console as DOS. I try not to be rude about it, but I really would like to prevent those who are not very familiar with Windows or its history from associating the limits and internal behavior of MS-DOS with the console subsystem of Windows NT. Especially with the anti-Windows sentiment that seems to be getting more popular (not that it's entirely without merit, but that's another topic for another day on another list), I'd rather see operating systems judged on things that are actually true and not miscellaneous FUD spread by ignorance and confusion. I realize it can come off as pedantic, but what may be obvious to those with of us with a lot of experience with different operating systems over the years can easily slip past a novice. BTW, there are several short and unambiguous terms one can use to refer to the Windows CLI environment (or parts thereof): cmd, command prompt, command line, terminal, console, etc.. Also, I don't think I've ever encountered anyone who prefers to call it DOS even though they know it's not correct, but if you say it's not unusual, then they're obviously out there, and I'll keep that in mind before jumping in to correct them. -- CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 9.1
[toc] | [prev] | [next] | [standalone]
| From | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| Date | 2013-07-03 09:51 +0100 |
| Subject | Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] |
| Message-ID | <mailman.4155.1372841469.3114.python-list@python.org> |
| In reply to | #49688 |
On 03/07/2013 09:28, Andrew Berg wrote: > On 2013.07.03 02:34, Tim Golden wrote: >> While this is clearly true, it's by no means unusual for people to >> refer to the "DOS Box" or talk about "DOS commands" etc. even when >> they're quite well aware of the history of Windows and its Console >> subsystem. It's just quicker than saying "Console Window" or >> something. >> >> I mention this because it seems to get called out every time >> someone uses the term "DOS" on this and other Python lists and it >> can smack slightly of pedantry. > I really would like to prevent those who are not very familiar with > Windows or its history from associating the limits and internal > behavior of MS-DOS with the console subsystem of Windows NT. > Especially with the anti-Windows sentiment that seems to be getting > more popular (not that it's entirely without merit, but that's > another topic for another day on another list), I'd rather see > operating systems judged on things that are actually true and not > miscellaneous FUD spread by ignorance and confusion. We can certainly agree on this. I can't count the number of emails I've deleted as too hot-headed in response to dismissive comments about Windows as a platform. Some of them, at least, appear to be from people who last actually used Windows back in the 9x days when the command window was very limited indeed. I realize it can > come off as pedantic, but what may be obvious to those with of us > with a lot of experience with different operating systems over the > years can easily slip past a novice. I suppose I view it in the same light as people (very few, thankfully, in my experience) who go out of their way to correct "MB" to "MiB" when talking about disk sizes. Or -- and I'm definitely guilty of this -- of pointing out that London telephone numbers are all 020 plus eight digits and *not* 0207 or 0208 plus seven digits. Whenever I do that I'm aware that I'm technically in the right but that, for all practical purposes, it's a needless precision. Obviously, if it were clearly a source of confusion in some context I'd clarify what needed to be clarified. TJG
[toc] | [prev] | [next] | [standalone]
| From | Tim Chase <python.list@tim.thechases.com> |
|---|---|
| Date | 2013-07-03 07:50 -0500 |
| Subject | Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] |
| Message-ID | <mailman.4163.1372855746.3114.python-list@python.org> |
| In reply to | #49688 |
On 2013-07-03 09:51, Tim Golden wrote:
> We can certainly agree on this. I can't count the number of emails
> I've deleted as too hot-headed in response to dismissive comments
> about Windows as a platform. Some of them, at least, appear to be
> from people who last actually used Windows back in the 9x days when
> the command window was very limited indeed.
I guess one of my biggest frustrations with the cmd.exe (and
command.com) interpreters is that argument processing is left to the
application, so each application may do it slightly differently:
C:\temp\> find weather *.py
FIND: Parameter format not correct
C:\temp\> find "weather" *.py
---------- WFD.PY
weather = Weather(lat, lon)
C:\temp\> findstr weather *.py
wfd.py: weather = Weather(lat, lon)
C:\temp\> findstr "weather" *.py
wfd.py: weather = Weather(lat, lon)
And more maddeningly:
C:\temp\> start file.txt
... opens the file correctly in Notepad
C:\temp\> start "file with space.txt"
... opens a new dos box with the name "file with space.txt" rather
than opening the file
C:\temp\> start "" "file with space.txt"
... opens the file correctly in Notepad
It's the little inconsistencies like this that wear daily on me. That
and the lack of built-in utilities, so I'm regularly adding GNU tools
on new boxes.
-tkc
[toc] | [prev] | [next] | [standalone]
| From | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| Date | 2013-07-03 14:00 +0100 |
| Subject | Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] |
| Message-ID | <mailman.4164.1372856454.3114.python-list@python.org> |
| In reply to | #49688 |
On 03/07/2013 13:50, Tim Chase wrote: > On 2013-07-03 09:51, Tim Golden wrote: >> We can certainly agree on this. I can't count the number of emails >> I've deleted as too hot-headed in response to dismissive comments >> about Windows as a platform. Some of them, at least, appear to be >> from people who last actually used Windows back in the 9x days when >> the command window was very limited indeed. > > I guess one of my biggest frustrations with the cmd.exe (and > command.com) interpreters is that argument processing is left to the > application, so each application may do it slightly differently: Goodness, I doubt if you'll find anyone who can seriously make a case that the Windows command prompt is all it might be. I'm not a Powershell user myself but people speak highly of it. Or, as you say, you can use the GNU tools either natively or via cygwin. Not my cup of tea, but that's the way of tools: one man's meat... More to the point, I've got no problem with informed criticism (although there's little point in grumbling just for the sake of it). The problem I have is with criticisms which are years out of date, or which appear to be fuelled by prejudice more than by experience. TJG
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2013-07-03 13:19 +0000 |
| Subject | Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] |
| Message-ID | <51d424de$0$9505$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #49728 |
On Wed, 03 Jul 2013 14:00:49 +0100, Tim Golden wrote: > Goodness, I doubt if you'll find anyone who can seriously make a case > that the Windows command prompt is all it might be. I'm not a Powershell > user myself but people speak highly of it. I understand that Powershell is aimed more for batch use rather than interactive use. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Jeff Schwab <jeff@schwabcenter.com> |
|---|---|
| Date | 2013-07-03 09:22 -0400 |
| Subject | Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] |
| Message-ID | <2013070309222451280-jeff@schwabcentercom> |
| In reply to | #49729 |
On 2013-07-03 13:19:26 +0000, Steven D'Aprano said: > On Wed, 03 Jul 2013 14:00:49 +0100, Tim Golden wrote: > >> Goodness, I doubt if you'll find anyone who can seriously make a case >> that the Windows command prompt is all it might be. I'm not a Powershell >> user myself but people speak highly of it. > > I understand that Powershell is aimed more for batch use rather than > interactive use. Not sure what gave that impression. PS comes with handy Unix-like aliases by default. I used it interactively every day for years, and recommend it over either cmd or Cygwin.
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2013-07-03 18:11 -0400 |
| Subject | Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] |
| Message-ID | <mailman.4184.1372889488.3114.python-list@python.org> |
| In reply to | #49729 |
On 03 Jul 2013 13:19:26 GMT, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> declaimed the following:
>On Wed, 03 Jul 2013 14:00:49 +0100, Tim Golden wrote:
>
>> Goodness, I doubt if you'll find anyone who can seriously make a case
>> that the Windows command prompt is all it might be. I'm not a Powershell
>> user myself but people speak highly of it.
>
>I understand that Powershell is aimed more for batch use rather than
>interactive use.
In one respect: no...
Consider that the Powershell default is to /prevent/ execution of
script files unless some security settings have been changed; even local
script files need to be "signed" to be executed.
Powershell is mainly aimed at system administration. I've spent weeks,
at work, where 90% of my day involved variations of a command like:
Get-ChildItem -Recurse -Filter "*.ad*" | Select-String -Pattern
"some-function-name"
{assignment was to trace use of some system calls up through to the user
API level to ensure that the API documented that it might block}
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2013-07-03 17:35 -0600 |
| Subject | Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] |
| Message-ID | <mailman.4191.1372894603.3114.python-list@python.org> |
| In reply to | #49729 |
On Wed, Jul 3, 2013 at 4:11 PM, Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote: > On 03 Jul 2013 13:19:26 GMT, Steven D'Aprano > <steve+comp.lang.python@pearwood.info> declaimed the following: > >>On Wed, 03 Jul 2013 14:00:49 +0100, Tim Golden wrote: >> >>> Goodness, I doubt if you'll find anyone who can seriously make a case >>> that the Windows command prompt is all it might be. I'm not a Powershell >>> user myself but people speak highly of it. >> >>I understand that Powershell is aimed more for batch use rather than >>interactive use. > > In one respect: no... > > Consider that the Powershell default is to /prevent/ execution of > script files unless some security settings have been changed; even local > script files need to be "signed" to be executed. IOW, it's aimed at *secure* batch use for paranoid sysadmins. According to microsoft.com: """ Windows PowerShell® is a task-based command-line shell and scripting language designed especially for system administration. Built on the .NET Framework, Windows PowerShell® helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows. """ Which would seem to indicate that it targets both interactive and scripting uses.
[toc] | [prev] | [next] | [standalone]
| From | Wayne Werner <wayne@waynewerner.com> |
|---|---|
| Date | 2013-07-04 09:08 -0500 |
| Subject | Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?] |
| Message-ID | <mailman.4231.1372946931.3114.python-list@python.org> |
| In reply to | #49729 |
On Wed, 3 Jul 2013, Dennis Lee Bieber wrote: > Consider that the Powershell default is to /prevent/ execution of > script files unless some security settings have been changed; even local > script files need to be "signed" to be executed. Protip: No they don't - wrap it in a cmd/bat file and have it launch powershell[1]: powershell -ExecutionPolicy Bypass -File ... \o/ Microsoft "security" at it again! (reminds me a bit of just pushing "Cancel" to log into windows 98, I think it was) -W [1]: http://stackoverflow.com/q/728143/344286
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.python
csiph-web