Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60548
| References | <989ee1b9-141a-4cb3-a9a2-f1527c0d0db3@googlegroups.com> <ebf6c8a7-3f97-427e-b597-6a0515d1d4d8@googlegroups.com> <155f2618-7e2a-4979-9e1e-a046d9ee362b@googlegroups.com> <CAPTjJmp6NbLBix_2aDBCW-o+M6d87nrM9HbEh0n-kXUOekY4Ug@mail.gmail.com> <pfl999hgispi4ant6asqiufoem8r6rh8jk@4ax.com> |
|---|---|
| Date | 2013-11-27 10:09 +1100 |
| Subject | Re: Excute script only from another file |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3260.1385507364.18130.python-list@python.org> (permalink) |
On Wed, Nov 27, 2013 at 4:25 AM, Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote: > On Tue, 26 Nov 2013 13:41:07 +1100, Chris Angelico <rosuav@gmail.com> > declaimed the following: > >> >>Totally sure-fire. Absolutely prevents any execution until it's >>renamed. By the way, what does "associate" mean, and what does it have >>to do with file names? >> > Windows-speak... > > Where UNIX/Linux relies upon the first line of a script to identify > what executable is used to process it (the #! line), Windows uses a linked > pair of registry entries Yeah. It's usually a GUI feature, not a command-line one, and it certainly has nothing to do with preventing execution - it is strictly a convenience. In the OS/2 WorkPlace Shell, you can associate files with programs by either a filename pattern (which doesn't have to be star-dot-something - I've always had an association "Makefile.*"), file type (not MIME type - this system predates that - but a category that files can be added to), object class (when a file is created, it can be a subclass of WPFile, like DeScribeDocument), or manually on an individual file, which is then stored as an extended attribute on that file. But it's still nothing more than a shortcut - it lets you put a program into the "Open ->" menu, and (optionally) choose one program from said menu to be the default, which is run when you double-click on the file's icon (or call the associated method on the file's object - everything in the WPS is an object, and naturally any program can send any object any method). Deleting or breaking an association doesn't stop you dragging the icon onto the program - which is sometimes necessary in situations where information isn't properly carried through. It certainly does not stop Python from executing a script. My point was that Rick had made the assumption that the GUI was *everything* and that users were able to do nothing beyond double-clicking on icons - and that he did not mention this assumption, suggesting he was unaware that he had made it. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Excute script only from another file Himanshu Garg <hgarg.india@gmail.com> - 2013-11-24 17:55 -0800
Re: Excute script only from another file Chris Angelico <rosuav@gmail.com> - 2013-11-25 14:15 +1100
Re: Excute script only from another file Dave Angel <davea@davea.name> - 2013-11-24 22:20 -0500
Re: Excute script only from another file Larry Hudson <orgnut@yahoo.com> - 2013-11-26 00:10 -0800
Re: Excute script only from another file Michael Torrie <torriem@gmail.com> - 2013-11-24 19:58 -0700
Re: Excute script only from another file Peter Otten <__peter__@web.de> - 2013-11-25 09:12 +0100
Re: Excute script only from another file Himanshu Garg <hgarg.india@gmail.com> - 2013-11-25 02:52 -0800
Re: Excute script only from another file Dave Angel <davea@davea.name> - 2013-11-25 07:16 -0500
Re: Excute script only from another file Rick Johnson <rantingrickjohnson@gmail.com> - 2013-11-25 18:28 -0800
Re: Excute script only from another file Chris Angelico <rosuav@gmail.com> - 2013-11-26 13:41 +1100
Re: Excute script only from another file Rick Johnson <rantingrickjohnson@gmail.com> - 2013-11-25 19:45 -0800
Re: Excute script only from another file Steven D'Aprano <steve@pearwood.info> - 2013-11-26 03:09 +0000
Re: Excute script only from another file Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-11-26 12:25 -0500
Re: Excute script only from another file Chris Angelico <rosuav@gmail.com> - 2013-11-27 10:09 +1100
Re: Excute script only from another file Rick Johnson <rantingrickjohnson@gmail.com> - 2013-11-26 17:56 -0800
Re: Excute script only from another file Chris Angelico <rosuav@gmail.com> - 2013-11-27 13:39 +1100
csiph-web