Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Integrating Unix scripting in Cocoa app



--- Ron Fleckner <email@hidden> wrote:

> So I may have  
> caveats such as "You can put any shell script into
> the Scripts folder  
> for inclusion in the Scripts menu as long as it is
> executable and has  
> the appropriate file extension." or some such rule. 

I would suggest if you are going to place any caveats,
they should be the script must use the '#!' properly
and have its executable bit(s) set.  Those have been
the only right way to treat scripts (be they Bourne,
csh, perl, Python, etc.) as executables under UNIX for
at least two decades.  I would even go so far as to
throw overboard the old assumption that scripts not
including the '#!' are Bourne shell scripts.  That too
has been bad practice for at least 20 years and you
shouldn't be forced to support that kind of legacy.

File name extensions are meaningless in UNIX and
something Apple grafted onto the Finder simply to make
the transition away from Windows easier.  None of the
underlying UNIX infrastructure cares about or uses
filename extensions.  If a user properly configures
the '#!' in a Python script, they shouldn't also be
forced to end it in a .py if they don't want to do so.
 On the other hand, your software shouldn't be forced
to search around for the correct Python interpretor to
use if the user won't put in the '#!' and insist that
any file ending in .py is a Python script.

Kevin Kuehl
email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Integrating Unix scripting in Cocoa app (From: Ron Fleckner <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.