How can I get 'out' output from ghpython without the actual 'out' output?


When using SDK mode ‘out’ output is removed, and adding it back results in null in the last actual outputs.

How can I get that fixed?
How can I get an ‘out’ output without having the ‘out’ output?

Thanks in advance.


Does writing to a file work?

1 Like

Hi Graham (@Dancergraham),

Thanks for the reply.

Not really, I didn’t want to save anything to a file because it slows the process down. But that reminded me of something I tried a while ago.

Now I see three options.

  • create a new output and passing a string to it.
  • using sticky to save the string
  • using this below, somehow :thinking:
import subprocess
import time
import os
import sys

cmd = [sys.executable, '']

p = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE)

for line in iter(p.stdout.readline, b''):
    print(">>> " + line.rstrip())