When testing a script using the IronPython interactive window in Visual Studio, the path variable in system.sys is a bunch of meaningless directories:

» import sys
» sys.path
['.', 'C:\\PROGRAM FILES (X86)\\MICROSOFT VISUAL STUDIO 10.0\\COMMON7\\IDE\\EXTENSIONS\\MICROSOFT\\IRONSTUDIO\\0.4\\Lib', 'C:\\PROGRAM FILES (X86)\\MICROSOFT VISUAL STUDIO 10.0\\COMMON7\\IDE\\EXTENSIONS\\MICROSOFT\\IRONSTUDIO\\0.4\\DLLs']
»

when I do the same operation in the IronPython console outside of Visual Studio, I get this:

IronPython 2.7 Beta 1 (2.7.0.10) on .NET 4.0.30319.1
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['.', 'C:\\Windows\\system32', 'C:\\Program Files (x86)\\IronPython 2.7\\Lib', ' C:\\Python27\\Lib\\site-packages', 'C:\\Python27\\Lib', 'C:\\Windows\\system32', 'C:\\Program Files (x86)\\IronPython 2.7\\DLLs', 'C:\\Program Files (x86)\\Iron
Python 2.7']
>>>

when I do the same operation in Visual Studio, just executing a script (not in the interactive mode) I get this:

['C:\\Users\\FedeV\\Documents\\Systems Biology\\Fission Yeast\\Network Analysis\ \Source Code', '.', 'C:\\Users\\FedeV\\Documents\\Systems Biology\\Fission Yeast \\Network Analysis\\Source Code', 'C:\\Program Files (x86)\\IronPython 2.7\\Lib' , 'C:\\Python27\\Lib\\site-packages', 'C:\\Python27\\Lib', 'C:\\Users\\FedeV\\Do cuments\\Systems Biology\\Fission Yeast\\Network Analysis\\Source Code', 'C:\\Pr ogram Files (x86)\\IronPython 2.7\\DLLs', 'C:\\Program Files (x86)\\IronPython 2
.7']
Press any key to continue . . .

I have set up an IRONPYTHONPATH variable in Windows, it seems that the interactive visual studio shell fails to import the proper path variable. Other than appending the correct directories to sys.path anyone know any 'proper' fix?

Thanks,

Federico
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to