Alternatively you can use the pyRevit command line to attach pyRevit to installed Revits using the new engine. Assuming your clone is named main the command would be:
$> pyrevit attach main 340 --installed
Code Changes?
I have modified pyRevit’s source code to be compatible with both IronPython 2 and 3. There is a compat.py module in pyrevit library that provides the necessary globals so you can configure your codes as well
from pyrevit.compat import PY3, PY2, IRONPY340
if PY3:
# do this
elif PY2:
# do that
Shipped Libraries?
Libraries shipped under site-packages in pyRevit installation, are supposed to be compatible with both py2 and py3. Please test and report any errors.
Hi @eirannejad, I feel a certain excitement, but I am not sure what the additional features or benefits are yet compared to CPython or IronPython 2.X ?
I tried looking at the IronPython 3.4 release notes, but this also didn’t enlighten me. Does this allow us to run pyRevit scripts using both Python 3.4 libraries and pyRevit modules?
from the other hand, there is no tick next to enum module, but the module is in the library, we can import it now.
then I have no idea what these tick-marks mean
True multi-threading (CPython has a global interpretter lock (GIL) that forcefully syncs threads so the multi-threading performance in IronPython is better)
CPython and IronPython, althought both python 3, implement it completely differently and they’re just different beasts.
Your existing pyRevit scripts should run nicely in the new IronPython 3 with the added benefit that you can completely forget about python 2 (python 3 has much more powerful language constructs and libraries)
Use CPython when you’d need to use any of “native” libraries built for CPython e.g. numpy, scipy etc