I'm usually not working on demos, so I find the vpython's script default
working directory inconvenient. Here's a little patch I apply to my local
copy. If vpython gets no arguments, it starts up in the demo directory as
before. If vpython *does* get an argument, however, it opens up the
indicated file.
--- visual-2.9.1/cvisual/vpython.in 2004-04-07 16:18:46.000000000 -0400
+++ visual-2.9.1-andy/cvisual/vpython.in 2004-04-08 13:26:04.000000000 -0400
@@ -2,5 +2,15 @@
PYTHON=@PYTHON@
visualdemodir=@visualdemodir@
visualidledir=@visual_idledir@
-cd $visualdemodir
-$PYTHON $visualidledir/@IDLE@
\ No newline at end of file
+case "$1" in
+'-h') echo "USAGE: $0 [file]"
+ echo "Default is to start in the demo directory: $visualdemodir"
+ exit 1
+ ;;
+'')
+ cd $visualdemodir
+ $PYTHON $visualidledir/@IDLE@
+ ;;
+*) $PYTHON $visualidledir/@IDLE@ "$*"
+ ;;
+esac
--
Andy Dougherty dou...@la...
Dept. of Physics
Lafayette College, Easton PA 18042
|