pharo-5

Is it possible to write shell command within Pharo smalltalk?

萝らか妹 提交于 2020-01-01 12:01:07
问题 Like in other programming language, is there a way of running linux shell command in Pharo smalltalk or a simple script ? I would like to have my Pharo image running a script that should be able to automate a tasks and return it to some value. I looked at almost all the documentation around and I couldn't find anything related. Maybe It does not allow such functionality. 回答1: Pharo does allow the OS interaction. The best way, in my eyes, is to use OSProcess (as MartinW already suggested).

How can I refresh a session for every 60 second and display it on transcript with Pharo?

爱⌒轻易说出口 提交于 2019-12-02 06:34:29
问题 |a b | a := ZnClient new. a get: 'http://cloud-storage.com/login'. a formAt: 'username' put: 'jom'; formAt: 'password' put: 'mypass'; post; get: 'http://cloud-storage.com/my-file'. "Here I want to refresh the session for every 60sec and" "to checking for newer data" b := a maxNumberOfRedirects:60 Transcript show: b; cr. I would like to implement a method that can refresh the ZnClient session every 60s for checking for newer data on the server I am logged into. I tried the redirect method of

How can I refresh a session for every 60 second and display it on transcript with Pharo?

我的未来我决定 提交于 2019-12-02 00:39:21
|a b | a := ZnClient new. a get: 'http://cloud-storage.com/login'. a formAt: 'username' put: 'jom'; formAt: 'password' put: 'mypass'; post; get: 'http://cloud-storage.com/my-file'. "Here I want to refresh the session for every 60sec and" "to checking for newer data" b := a maxNumberOfRedirects:60 Transcript show: b; cr. I would like to implement a method that can refresh the ZnClient session every 60s for checking for newer data on the server I am logged into. I tried the redirect method of pharo but it does not seem to work. or say It does not show anything. Any idea? | session data | session