[squeak-dev] how to get an environment variable's value?

David T. Lewis lewis at mail.msen.com
Fri Mar 18 20:08:08 UTC 2011


On Fri, Mar 18, 2011 at 10:05:42AM -0700, Travis Griggs wrote:
> subject asks it all. I see references to OSProcess out on the net, but
> that class doesn't appear to exist in my Pharo image. I assume it's
> legal to ask Pharo related questions here?

MCHttpRepository
    location: 'http://www.squeaksource.com/OSProcess'
    user: ''
    password: ''

OSProcess is an external package that you can load from SqueakSource.
I think there's a ConfigurationOfOSProcess that you can use (and on
Squeak you can load it through SqueakMap), but really I recommend
just opening a Montecello browser and loading the latest version, which
currently is OSProcess-dtl.59.mcz. If you are doing any fancy coordination
with external processes, you'll also want to load package CommandShell
(leave out the MVC stuff if you are using Pharo).

If you specifically want access to the environment and nothing else,
the necessary primitive is in the OSProcessPlugin that is distributed
with Unix/Mac VMs, so you can just call the primitive. But do load
a copy of OSProcess to see how it is done.

Dave




More information about the Squeak-dev mailing list