[IronPython] Visual Studio Interactive Shell Search Path:

Jiang Zhang zh_jiang at hotmail.com
Fri Jan 28 18:24:49 CET 2011


This is tracked by
http://ironpython.codeplex.com/workitem/29077

Very anonying. It makes importing many standard libs fail.

-----原始邮件----- 
From: Federico Vaggi
Sent: Friday, January 28, 2011 2:39 AM
To: Discussion of IronPython
Subject: [IronPython] Visual Studio Interactive Shell Search Path:

  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 at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com 




More information about the Ironpython-users mailing list