Latest Version: 0.9.6.1
  Dashboard > Pylons Cookbook > ... > Pylons Curve and Surface Fitting Tutorial > Adding source code output
  Pylons Cookbook Log In | Sign Up   View a printable version of the current page.  
  Adding source code output
Added by James R. Phillips, last edited by Mike Orr on Jan 06, 2008  (view change)
Labels: 
(None)

The Python Equations package can automatically generate source code in several computing languages. We're going to add this output to our site, so we don't have to redo work that was already done.

Add this to the bottom of results.mako, just before the final <PRE> tag:

1
2
3
4
5
6
7
8
9
<code>
## uncomment your choice of computing languages here...
##${c.equation.CodeJAVA()}
##${c.equation.CodeCPP()}
${c.equation.CodePYTHON()}
##${c.equation.CodeCS()}
##${c.equation.CodeSCILAB()}
##${c.equation.CodeMATLAB()}
</code>

and again try http://127.0.0.1:5000/ - you should now have automatically generated Python source code.

Next: --> Adding 3D surface fitting

Site running on a free Atlassian Confluence Open Source Project License granted to Pylons. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.3.3 Build:#645 Feb 13, 2007) - Bug/feature request - Contact Administrators
Top