词条 | Spyce (software) |
释义 |
Common Spyce embedding methodsSince Python uses indentation to determine the beginning and end of a block, Spyce includes several ways to embed Python code. Shown below are the three most common ways. Spyce supports ASP/JSP-style delimiters ( | Python 'chunks' (multiple Python statements with traditional indentation): or | Individual statements within delimiters (indentation not required): or | Expressions evaluation <b>I am [[= 5*3 ]] years old.</b> or <b>I am <%= 5*3 %> years old.</b> }} The techniques above can be freely mixed and embedded in any HTML document. Any legal Python code can be embedded and any Python module can be imported, which makes it especially suited for writing very robust applications (using exception handling and unit testing single modules individually). FeaturesSome other features include custom tags (ala JSP), spyce lambdas and active handlers (reminiscent of ASP). RequirementsSpyce brings Python's standard library and the programming language itself to the web. The minimum requirement is a working Python installation (it ships with a standalone web server written in Python that can be used during development), although it can be used in conjunction with several web servers such as Apache and IIS in a variety of ways. Configuration is done using Python modules that are imported by the web server during initialization, so all that is really required to get started with Spyce is basic knowledge of Python. See also{{Portal|Free and open-source software}}
References1. ^Spyce - Python Server Pages (PSP) External links
2 : Free computer programming tools|Python (programming language) |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。