Revit python shell interpreter

49 views
Skip to first unread message

hamid khb

unread,
Aug 21, 2022, 4:24:57 PM8/21/22
to RevitPythonShell
Hi everyone, 

I just started using/learning RPS and I have three diff python versions installed on my PC and I think the RPS automatically recognized the IronPython. The question is how can I change this.

Thanks 
Hamid 

Callum

unread,
Aug 22, 2022, 5:23:04 PM8/22/22
to RevitPythonShell
How do you know that the RPS recognizes Ironpython - when you run the RPS console, what version of IronPython does it present?
iron.png


Steven Williams

unread,
Aug 24, 2022, 1:22:21 PM8/24/22
to RevitPythonShell
RPS does not use any of your installed versions. Here are all the ways I have read to find the path to the Python interpreter, none of which point to a valid Python executable on my system.

2022-08-24 10.20.33 Revit_mMQRXIsIfz.png
import os
print os.getcwd()
print os.__file__
print os.path.abspath(".")
print os.popen("readlink -f `which python`").read()

import sys
print sys.executable

print os.path.dirname(sys.executable)
print os.path.realpath(sys.executable)


This should make sense in the context of IronPython, which is compiled into the add-in.

Reply all
Reply to author
Forward
0 new messages