Jump to content
Geochemist's Workbench Support Forum
Helge

pipe react_output.txt in python

Recommended Posts

Hello everybody,

is it possible to pipe what is usually shown as react_output.txt (when you push the button "view results") from a python script into a user defined text file?

Cheers,

Helge

Share this post


Link to post
Share on other sites

Does anybody know...? 😞

Share this post


Link to post
Share on other sites

Hello Helge,

Sorry about the delayed response. If you would like to put the results in a file, you can try exec_cmd with the normal "print" command in combination with the "suffix" command for changing the name just like one would normally do. The file should still get generated. If you would like a file name besides what can be done directly in React ( React_output[SUFFIX].txt ) then you can try a simple file rename in Python.

Hope this helps,

Jia Wang

Share this post


Link to post
Share on other sites

This works:

myGWB.exec_cmd('print react_output.txt')

os.rename(r'react_output.txt',r'<whatever name>')

Thanks,
Helge

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...