Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2006
    Location
    Zurich, Switzerland
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ASP and Python 2.5

    Hi all

    I'd like to use ASP (vbscript) and Python 2.5 in the same .asp-File.

    A sample code could be:

    Code:
    <%@LANGUAGE=Python%>
    <HTML>
    <head></head>
    <body>
    <h1>Python Test</h1>
    
    <%
    #do some python stuff here
    print '<p>' #this is a comment
    print 'See this is just like most other HTML'
    print '<br>'
    
    
    Response.Write('Python Test<br>')
    Response.write('<h3>Smaller heading</hr>')
    %>
    
    </body>
    </html>
    I go now the message that python ist not installed on the IIS. But I have choosen the path of python25 and also the extension (.py).

    Could someone help me thanks
    Bart

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    I'm don't have much* experience with Python but I'm pretty sure you can't do this. You'd have to set the .asp file extension to be dealt with by both the ASP and Python script engines, and you can't do that. I think. It'd be like... having Word docs open in Word and in Photoshop, at the same time. Or something.

    *any

  • #3
    New Coder
    Join Date
    Aug 2006
    Location
    Zurich, Switzerland
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But I thought ASP can deal with several languages like perl, python, vbscript, etc

  • #4
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've never used Python with or without ASP but presumably you need to install the scripting engine and then choose the scripting language in IIS.

    The pages will still have to be .asp
    http://www.4guysfromrolla.com/webtech/082201-1.shtml


    You can output VBScript in your pages using <script> tags.
    http://aspjavascript.com/lesson04.asp


    Also see this for ambiguities
    http://blogs.msdn.com/ericlippert/ar.../19/76438.aspx

  • #5
    New Coder
    Join Date
    Aug 2006
    Location
    Zurich, Switzerland
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    Hi

    Thanks a lot for this links. Now it works since I've installed ActiveState Python.

    Cheers
    Bart
    Last edited by Bartholomew; 02-12-2007 at 06:00 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •