Import directive not recognized in IronPython?

Last post 01-12-2008 12:25 PM by xanadu. 2 replies.

Sort Posts:

  • Import directive not recognized in IronPython?

    01-10-2008, 4:21 AM
    • Loading...
    • xanadu
    • Joined on 05-11-2005, 1:53 PM
    • Denmark
    • Posts 6

    Hi,

    on a C# page, this directive would make the members of namespace Foo available:

    <%@ Import Namespace="Foo" %> 

    To achieve the same on an IronPython page, I need to write:

    from Foo import *

    So the namespace directive is superfluent there. Is this by design or something that will get fixed? I like declaring often-used namespaces with directives...

    Best regards,
    xanadu

  • Re: Import directive not recognized in IronPython?

    01-11-2008, 1:23 AM
    • Loading...
    • mobRDF
    • Joined on 11-22-2007, 2:35 AM
    • Posts 8

    Hi xanadu,

    There is a list of default namespaces already imported by Visual Studio in ASP.NET. You only need to import others when they are required.

     

    sea ...
  • Re: Import directive not recognized in IronPython?

    01-12-2008, 12:25 PM
    • Loading...
    • xanadu
    • Joined on 05-11-2005, 1:53 PM
    • Denmark
    • Posts 6

    mobRDF:

    Hi xanadu,

    There is a list of default namespaces already imported by Visual Studio in ASP.NET. You only need to import others when they are required.

    Hi mobRDF,

    you're right, but my point was that if I need to import a namespace not in the default namespace, then I can use the Import directive in both C# and VB.NET, but not in IronPython. The Page, Import and other directives are designed to be language-neutral, but the IronPython implementation ignores the Import. I wondered if that would be fixed or not in a future release, or if it is by design.

    Best regards,
    xanadu

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter