I am creating a standalone using python. In this offline mode, a ruby file must be executed.
I read this article - http://www.decalage.info/python/ruby_bridge I used os.system (), which works well. But I have a problem. If there is some error in the ruby file, the file simply exits without errors. Could you let me know how to get the GET console output so that I can display the same in my offline mode.
you can use the subprocess module
cmd="ruby myrubyscript.rb" p=subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) output, errors = p.communicate()
then use the variable output
output
, Python , Ruby . , Python.
Source: https://habr.com/ru/post/1767977/More articles:The best "free" JMS implementation (which doesn't crash all the time) - javakeydown Event to override return key not working in Firefox - javascriptPHP - spam cleanup - phpМогу ли я обновить представление списка в одном действии, а im - в другом действии? - androidОбработка HTTP/1.1 запросов на обновление в CherryPy - pythonCombining string literals and integer constants - c ++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1767979/intercept-calls-to-httpsession-in-tomcat-6&usg=ALkJrhg_1qwtMR6E3tHb4FWuMFoCMikLDgGet Position Index from Data Management - asp.netProblem with NSThread in iOS - iphoneHow does the PHP REST API get PUTted data? - restAll Articles