GH Python copy module?

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]

  • up

    Andrew Heumann

    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. 

    1