DataInput and DataOutput in python

Hello gentlemen.
Does anyone have experience with creating DataInput and DataOutput with python?
I have a problem writing in the command where to save the file and which data to put in the file.

Thank you :slight_smile:

Not directly, but you might instead implement a native Python module to write/read data to/from disk. Depending on the data types, I usually implement the pickle or json modules:

There’s also the native shelve module, which seems to be functionally similar to structuring the data into as dictionary and pickling it (have not tried it myself though).

1 Like

I’ve not tried it either, Python’s native File IO is sufficient for me too, even for .csv files.

But this looks useful - cheers. Isn’t ghpythonlib.components how you access Node In Code?

Unfortunately not every Grasshopper component works when called via Node In Code. There are thousands of them, and this is a “nice to have”, so you can’t blame the devs.

If you want to use them natively in Grasshopper, the best description I can find is: Can Two GrassHopper definitions communicate? - #12 by RIL

1 Like

I’m able to create data with python , but i’m not able to read it …

They didn’t solve it there either.