Rhino.Python に、CPython 標準モジュールを追加

Rhinoceros 5.0
EditPythonScript

Rhino.Python, GHPython は、IronPython で、2系。

import csv

import error
no module named csv



cpython の標準ライブラリを、IronPython にいれる。
(今回は、csv.py)


ソースはこれ
標準ライブラリは、Lib のなかにある。
github.com

場所はここ
C:\Users\xxx\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (xxx)\settings\lib

import csv

print dir(csv)

['Dialect', 'DictReader', 'DictWriter', 'Error', 'QUOTE_ALL', 'QUOTE_MINIMAL', 'QUOTE_NONE', 'QUOTE_NONNUMERIC', 'Sniffer', 'StringIO', '_Dialect', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__version__', 'excel', 'excel_tab', 'field_size_limit', 'get_dialect', 'list_dialects', 're', 'reader', 'reduce', 'register_dialect', 'unregister_dialect', 'writer']


Rhino.Python でも、GHPython でもたぶん動いた。