algorithmic modeling for Rhino
Hello, I need to deep copy a list in a ghpython script I am writing, but it doesn't seem that the version of IronPython used in grasshopper has the copy module available. Is it possible to install the copy module for IronPython or do I have to instead manually duplicate the list as I have been doing?
What I would like to do:
import copy
L1 = [1, 2, 3]
L2 = copy.deepcopy(L1)
What I am currently doing:
L1 = [1, 2, 3]
L2 = [1, 2, 3]
Tags:
copy should be present in ironpython version 2.6 or later - I think gh ships with at least 2.7. it doesn't show up in the autocomplete menu for me but your code in the "would like to do" section executes just fine in gh python.
Hmm that explains it. Thanks for reply. I just assumed that since it didn't show up in the autocomplete menu that it wouldn't work, haha.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by