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


Groups > comp.lang.python > #60548

Re: Excute script only from another file

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'attribute': 0.07; 'subject:file': 0.07; 'created,': 0.09; 'executable': 0.09; 'feature,': 0.09; 'filename': 0.09; 'naturally': 0.09; 'prevents': 0.09; 'subject:script': 0.09; 'python': 0.11; 'gui': 0.12; 'stored': 0.12; 'windows': 0.15; '(when': 0.16; '4:25': 0.16; 'command-line': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'icon': 0.16; 'line),': 0.16; 'mean,': 0.16; 'names?': 0.16; 'shortcut': 0.16; 'subclass': 0.16; 'through.': 0.16; 'wrote:': 0.18; '(not': 0.18; 'wed,': 0.18; 'file,': 0.19; 'properly': 0.19; '(the': 0.22; 'certainly': 0.24; 'entries': 0.24; 'lets': 0.24; 'script.': 0.24; 'unix/linux': 0.24; 'file.': 0.24; '(or': 0.24; "i've": 0.25; 'script': 0.25; 'mention': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; '(which': 0.31; 'usually': 0.31; 'breaking': 0.31; 'default,': 0.31; 'relies': 0.31; 'file': 0.32; 'class': 0.32; 'run': 0.32; 'subject:from': 0.34; 'beyond': 0.35; 'one,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'executing': 0.36; 'object,': 0.36; 'method': 0.36; 'sometimes': 0.38; 'nov': 0.38; 'to:addr:python- list': 0.38; 'files': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'users': 0.40; 'deleting': 0.60; 'manually': 0.60; 'extended': 0.61; 'identify': 0.61; 'strictly': 0.61; 'first': 0.61; 'information': 0.63; 'choose': 0.64; 'more': 0.64; 'linked': 0.65; 'preventing': 0.84; 'unaware': 0.84; 'absolutely': 0.87; 'shell,': 0.91; 'rick': 0.93; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=rZwtMFUz5WslkZ/koj1L0+SxTwoyvH2j19wOSHN8tG0=; b=pf87hVDc4FECtOABm6LXOwx2HiRFq9hx8woyOw/qml0w85sYHde7PCk9aBway/Hl3r qKyIcB4EFLqkfE2rsj/UyTpyWKlyuPPrjbzGf8fgLcFCpVqAmnJJwVAtOprYXyuR/Wz/ XtHnONzLj0t8TQKrDVyliQPVbzqR1jJg18jR53NBlfoWTzccKOWg2CY6i5MmFprweXky NPbVbU0FhB0B2/qsGF5i8mHpUYSYhLQdvcWjV3Zti3ffTETRslmPD+ipx93kybqres8m NSaavuH4qyR99V6cKBU8fHTDU2If5iCxL9FQd5IcTQImzhlNXRn5VXHh8+dq10APcyD1 U8/w==
MIME-Version 1.0
X-Received by 10.68.161.2 with SMTP id xo2mr1828034pbb.179.1385507353722; Tue, 26 Nov 2013 15:09:13 -0800 (PST)
In-Reply-To <pfl999hgispi4ant6asqiufoem8r6rh8jk@4ax.com>
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 Wed, 27 Nov 2013 10:09:13 +1100
Subject Re: Excute script only from another file
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3260.1385507364.18130.python-list@python.org> (permalink)
Lines 42
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1385507364 news.xs4all.nl 16001 [2001:888:2000:d::a6]:37070
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:60548

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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