Command Line Squeak/Scripting: Status?

Aaron Reichow areichow at ipharos.com
Fri Feb 9 08:53:25 UTC 2007


Hi everyone!

I'm curious about what the status of a Squeak setup for scripting is,  
specifically for Linux?  My end goal is being able to tell a user or  
run programmatically from another script a Squeak script by typing  
something like:

./hallowelt.sq

where hallowelt.sq is a file like-

#!/usr/bin/squeak -filein
Transcript show: 'Hello World'; cr.

I also would really, really like, the ability to pass command line  
arguments, so:

./hallowelt2.sq Aaron

#!/usr/bin/squeak -filein
Transcript show: 'Hello World ';
	show: (Argv at: 2);
	cr.


I don't need anything very fancy, nor do I need a certain version of  
the image or much in the way of library support. The one library I do  
need is PostgreSQL suport.  In my newish job, I'm starting to move  
various reports that pull data from a super flexible object- 
relational database setup from Java to Python. I'd like to do this in  
Squeak, obviously! But due to a few factors, the first couple I've  
done are in Python.  I don't need to do any elaborate stuff, I don't  
need a curses interface, etc. I'm fine with most of it all being in  
the image, with the hallowelt.sq file in this example being nothing  
other than something that runs the squeak VM but some how tells the  
image to run a certain script through a command line argument.   I'd  
do development on a regular Squeak VM on my Mac, then deploy to the  
server where someone else would run the reports.

Worst case I could roll this myself, skipping commandline arguments  
and using config files that the report-runner has to edit to specify  
the date range rather than just doing it on the command line. But I'd  
rather a more Unix-feeling solution. I personally don't need anything  
like input and output through pipes, but I might find a use for them  
later if the option was there.

So, what's up with Squeak for this sort of setup? What are my  
options? Do I have any useable ones?

Regards,
Aaron



More information about the Squeak-dev mailing list