why won't Platypus run this script?

Can anyone see anything in this script, installed via Fink's visual-py25 package, that would prevent Platypus from running it? I'm positive X11.app is running. The script runs fine from a command line. I've tried everything I can think of but no dice. Platypus' developer isn't responding to emails. XDroplets runs the script perfectly. Any suggestions? The only scripts I can get to work with Platypus are the ones it comes with. Argh!

=====begin script
#! /bin/sh
# Variables determined by configure.
PYTHON=/sw/bin/python2.5

prefix=/sw
[ -d ~/.idlerc ] || mkdir ~/.idlerc
[ -r ~/.idlerc/config-main.cfg ] || cp /sw/share/doc/visual-py25/config-main.cfg ~/.idlerc/
export BROWSER=${BROWSER:-open}

visualexampledir=${prefix}/lib/python2.5/site-packages/visual/examples
IDLE=/sw/bin/idle2.5
PYTHONPATH=$PYTHONPATH
export PYTHONPATH

case "$1" in
'-h') echo "USAGE: $0 [file]"
echo "Default is to start in the examples directory: $visualexampledir"
exit 1
;;
'--help') echo "USAGE: $0 [file]"
echo "Default is to start in the examples directory: $visualexampledir"
exit 1
;;
'')
cd $visualexampledir
$PYTHON $IDLE
;;
*) $PYTHON $IDLE "$*"
;;
esac
=====end script

iMac G4/17" MacBook Pro, Mac OS X (10.4.9), 30GB iPod w/video

Posted on Jun 28, 2007 11:21 AM

Reply
7 replies

Jun 28, 2007 7:46 PM in response to Joe Heafner

Okay I finally got it working. Basically, I used shift and changed "$*" to "$@". Here's the modified script. I also had to tell Platypus about the DISPLAY environment setting.

One huge advantage of Platypus over XDroplets is that I can drop multiple files onto the script's icon and they'll open correctly in separate IDLE windows. However, if I want to drop an additional new file on the icon, it never opens up. I want to fix that behavior, but I've no idea how to do it.


Note that the oascript method of opening X11 works, but the Python stuff never starts up. Any ideas why? Quitting X11 via oascript works just fine.

=====begin script
#! /bin/sh
shift

open -a /Applications/Utilities/X11.app
#osascript -e 'tell application "X11" to open'

# Variables determined by configure.
PYTHON=/sw/bin/python2.5

prefix=/sw
[ -d ~/.idlerc ] || mkdir ~/.idlerc
[ -r ~/.idlerc/config-main.cfg ] || cp /sw/share/doc/visual-py25/config-main.cfg ~/.idlerc/
export BROWSER=${BROWSER:-open}

visualexampledir=${prefix}/lib/python2.5/site-packages/visual/examples
IDLE=/sw/bin/idle2.5
PYTHONPATH=$PYTHONPATH
export PYTHONPATH

case "$1" in
'-h') echo "USAGE: $0 [file]"
echo "Default is to start in the examples directory: $visualexampledir"
exit 1
;;
'--help') echo "USAGE: $0 [file]"
echo "Default is to start in the examples directory: $visualexampledir"
exit 1
;;
'')
cd $visualexampledir
$PYTHON $IDLE
;;
*) $PYTHON $IDLE "$@"
;;
esac

osascript -e 'tell application "X11" to quit'
=====end script

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

why won't Platypus run this script?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.