IIS ?? ??? Python ????????? ?? ????? ????

???? ?????? ???? ??????
???? ID: 276494
??? ?? ??????? ???? | ??? ?? ??????? ????

??????

Python ?? ??? interpreted ???????????? ???? ???? concept ??? Microsoft Visual Basic ????????? (VBScript), Microsoft JScript, Perl, ?? ???? ???????????? ?????? ?? ??? ??? ?? ??????? ????? ????? (IIS) ???? VBScript ?? JScript ?????????? ?? ??? Windows ???????????? ????? ?? ????? ???? ??, IIS ????? ?? ???? ???? ????????? interpreters ?????? ????? ????? (ASP) ?? ??? ??? ?? ??? ?? ???? ?????? ??????? ????? ??????? (CGI) ????????? ?? ???? ?? ???? ????? ???? ?? ?? Python CGI ?? ASP ?? ??? ???? ???? ?? ???????????? ???? ?? ??? ??? ????? ???? ?? ??? ???? ?????

???? ???????

?? ???? ?? Python ?????????? Python ????????? ?? ??????? ???? ?? ??? ????????? ????? ?? ??? ??? ??? ???? ???? ?? ???? ??? ?????? ActiveState ?? ActivePython 2.0 ?? ????? ???? ???

????? ????? ??? IIS ?? ASP ?? ??? ????? ?? ??? ??? ????????? ????? ?? ??? ??? ??????? Python ?????????? ??? ???? ?? ??? ???? ???????
  1. ?? ????????? ???? ?? Python ????????? ???? ??????? ?? ???? ????????? ?? ??? ????? ??? ???? ?? ???, ????? ????? ?? ????:

    1. ??? ??????? ???? ??????? (ISM), ?????????? ????????? ????? ??????? ?? ??? ?? ?? ????-????? ????, ?? ???? ??? ????? ???????.
    2. ????? ????????? ??????????,??????? ????????????,????????????? ?? ????? ????..
    3. ?? ???????????????? ?????????????? ???? ???????? ????? ?????? ??, ?? ?? it ????? ?? ????
    4. ??? ????? ????? ??? ????????? ???? ??, ?? ????? ??????????? ???? ????????? ??? ?????, ?? ??? ????????? ?? ??? ??? ??? (??????? ??? ?? "??????? ?????????")?
    5. ?? ????????????????, ?????? ???? ??(?????? ?????????) ????????? ????????? ???
    ????????? ?? ??? ???? ?? ???? ??? ???? ??????? ?? ??? "IIS ??? ???" ????????? ???????? ???? ??????
  2. ???????? ???? ?? ????????? ?????? ?? .py ??????? ?? ??? ??? ??? ??? ???? ?? ???, ????? ????? ?? ????:
    1. ISM ??? ?? ?????????????? ????? ?????, ???????? ?? ??? ????-????? ????, ?? ???? ??????.
    2. ??????? ????????-???? ???? ???, ????? ????WWW ?????? ????-????? ????, ?? ???? ?????????.
    3. ????? ????????? ????????????? ????? ????, ?? ???? ???configuration.
    4. ????????? ?????? ??????, ?? ??? ????? ????add, ?? ???? ??? ????? ??????? (???? ???????? ?? ??? ?? substituting) ?? ????? ?? ?? ??? ?????? ?????:
      • ???????? ?????: "C:\Python20\python.exe %s % s" (?? "% s" ???????? ????? ???? ?? ??? ????????? ?????-?????? interpreters ?? ??? ?????? ??, ????? ???? ??? ??????? ????? API [ISAPI] ?? ??? ?????? ???? ???? - ?????? ????????? ??????????)?
      • ?????????: .py
      • ????????? ?????: ??????
      • ?????? ?? ???? ????? ??: (???????) ?? ????? ????? ????OK.

  3. ???????? ???? ?? ????? ?? ?????????? ?? ??? ????????? ??? ??? ??? ??? ?? ???????? ?? ????? ???????? ???? (ACL)? ???? ????? ?? ???, IUSR_[computername]?? IWAM_[computername]?????????? ???? ?????? ?? ?? ?? ?? "?????" ?????? (RX)? ???? ?????? ?? ??????? ?????????? ?? ????? ?? ??? ??, ?? ?????? ????????? ?? ???-??? ?? ???? ???
????? Python ????????? ???? ??????? ?? IIS ?? ??? Python-?????? CGI ????????? ?? ???????? ?? ??? ??????? ???? ?? ??? ????? ???? ?? ???? ???

??? ??? ??? ?? ????? ?????? ???? Microsoft Notepad ?????, ?? ??? ?? ????? ????????? ????? ??? ?? ??? ??? ????????? ??????? ??? ????? ?? ??????Test.py.
print
print 'Status: 200 OK'
print 'Content-type: text/html'
print

print '<HTML><HEAD><TITLE>Python Sample CGI</TITLE></HEAD>'
print '<BODY>'
print '<H1>This is a header</H1>'

print '<p>' #this is a comment
print 'See this is just like most other HTML'
print '<br>'
print '</BODY>'
				

??? ???? ?? "Test.py" ?? ??????? ????:
HTTP://<computer_name></computer_name>/scripts/Test.py
???????? ??? ??, ?? ????? ?? ???? Python ?????????? ???? ????????? ?????????? ?? ??? ??? ???? ASP ??????? ???? ???? ??????? Python ???????????? ????, ?? ??? ?????? ?? ????? ?? ??? ????? ????? ?? ??? ?? ????? ????????? ????? ??? ?? ??? ??? ????????? ??????? ??? ????? ?? ??????Python.asp.
<%@LANGUAGE=Python%>
<HTML>
<head></head>
<body>
<h1>Python Test</h1>

<%
#do some python stuff here

Response.Write('Python Test<br>')
Response.write('<h3>Smaller heading</hr>')
%>

</body>
</html>
				

??? ???? ?? "Python.asp" ?? ??????? ????:
HTTP://<computer_name></computer_name>/scripts/python.asp

??????

??? ???? ??????? ?? ??? Python ?????:
HTTP://www.python.org/
?? ActiveState Python ?????????? ?????:
HTTP://www.activestate.com/Products/ActivePython/

?????-???? ?????? ????? ???? ??? ?? ???? ??? ????? ?? ?? ?? ?? ???????? ?? ?????? ???? ???? ??? ?? Microsoft ?? ???????? ???? ???.. Microsoft ?? ???????? ?? ????? ???????? ?? ??????????? ?? ???? ??? ??? ?? ??????, ?????????? ?? ???? ???? ?????? ?? ??? ???? ??..

?????? ?????? ???? ??? ???? ?????? ???? ?? ??? Microsoft ???? ?????-???? ?????? ??????? ?????? ????? ??.. ?? ?????? ??????? ???? ???? ????? ????? ?? ??? ???? ??.. Microsoft ?? ?????-???? ?????? ??????? ?? ??? ???? ?? ??? ?????? ???? ????..

???

???? ID: 276494 - ????? ???????: 29 ??????? 2010 - ??????: 4.0
??????: 
kbinfo kbmt KB276494 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:276494

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com