[Pharo-project] Accessing the OS Environment Variables
Hello, How can I access the OS Environment Variables from Pharo? Thanks, Alberto -- View this message in context: http://forum.world.st/Accessing-the-OS-Environment-Variables-tp4024106p40241... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Some time ago I've added some extensions to FileSystem to resolve path's using OS variables, I don't know if they were integrated. With ProcessWrapper you may use in Windows: ProcessWrapper new useStdout; startWithShellCommand: 'echo %programfiles%'; upToEnd then you need to trim the output. Cheers, Hernán 2011/11/10 Alberto Bacchelli <alberto.bacchelli@usi.ch>:
Hello,
 How can I access the OS Environment Variables from Pharo?
Thanks, Â Alberto
-- View this message in context: http://forum.world.st/Accessing-the-OS-Environment-Variables-tp4024106p40241... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Or with OSProcess: "OSProcess thisOSProcess environment" -- View this message in context: http://forum.world.st/Accessing-the-OS-Environment-Variables-tp4024106p40242... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Thank you! It works perfectly :) Sean P. DeNigris wrote:
Or with OSProcess: "OSProcess thisOSProcess environment"
-- View this message in context: http://forum.world.st/Accessing-the-OS-Environment-Variables-tp4024106p40313... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Alberto Bacchelli wrote
Thank you! It works perfectly :)
This comes up every so often so I added it to the online book http://book.pharo-project.org/book/PharoTools/OSProcess -- View this message in context: http://forum.world.st/Accessing-the-OS-Environment-Variables-tp4024106p41106... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (3)
-
Alberto Bacchelli -
Hernán Morales Durand -
Sean P. DeNigris