📄 246.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Robots" content="INDEX,NOFOLLOW">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<TITLE>Safari | Python Developer's Handbook -> The Interpreter</TITLE>
<LINK REL="stylesheet" HREF="oreillyi/oreillyN.css">
</HEAD>
<BODY bgcolor="white" text="black" link="#990000" vlink="#990000" alink="#990000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" cellpadding=5 cellspacing=0 border=0 class="navtopbg"><tr><td><font size="1"><p class="navtitle"><a href="8.html" class="navtitle">Web Development</a> > <a href="0672319942.html" class="navtitle">Python Developer's Handbook</a> > <a href="241.html" class="navtitle">18. JPython</a> > <span class="nonavtitle">The Interpreter</span></p></font></td><td align="right" valign="top" nowrap><font size="1"><a href="main.asp?list" class="safnavoff">See All Titles</a></font></td></tr></table>
<TABLE width=100% bgcolor=white border=0 cellspacing=0 cellpadding=5><TR><TD>
<TABLE border=0 width="100%" cellspacing=0 cellpadding=0><TR><td align=left width="15%" class="headingsubbarbg"><a href="245.html" title="Downloading and Installing JPython"><font size="1">< BACK</font></a></td><td align=center width="70%" class="headingsubbarbg"><font size="1"><a href="popanote.asp?pubui=oreilly&bookname=0672319942&snode=246" target="_blank" title="Make a public or private annnotation">Make Note</a> | <a href="246.html" title="Use a Safari bookmark to remember this section">Bookmark</a></font></td><td align=right width="15%" class="headingsubbarbg"><a href="247.html" title="The JPython Registry"><font size="1">CONTINUE ></font></a></td></TR></TABLE>
<a href="6%2F1%2F2002+6%3A25%3A05+PM.html" TABINDEX="-1"><img src=images/spacer.gif border=0 width=1 height=1></a><font color=white size=1>152015024128143245168232148039196038240039088173205162105045222218069155135243164165048</font><a href="read9.asp?bookname=0672319942&snode=246&now=6%2F1%2F2002+6%3A25%3A05+PM" TABINDEX="-1"><img src=images/spacer.gif border=0 width=1 height=1></a><br>
<FONT>
<h3>
The Interpreter</h3>
<p>The JPython installation places several files on your system, including a set of modules, some sample programs, an application called <tT CLAss="monofont">jpythonc</tt> (which we will see later), and the JPython interpreter.</P>
<P>The JPython interpreter looks very similar to the CPython interpreter (see <A Href="246#1.html">Figure 18.2</a>). However, <TT CLass="monofont">jpython</tt> is not a binary file, but a short script (or batch file, depending on your system) that invokes your local JVM, sets the Java property <tt class="monofont">install.path</tt> to an appropriate value, and then runs the Java class file <tt clasS="monofont">org.python.util.jpython.</tt>
</P>
<cenTer>
<h5>
<a Name="1"></A>Figure 18.2. If you glance at this screen, you might be confused whether JPython or CPython is running because both interpreters do look alike.</H5>
<IMg borDER="0" Width="500" HEIGht="314" srC="graphics/18fig02.gif" ALT="graphics/18fig02.gif">
</center>
<p>The following syntax shows the possible options that you can pass to JPython when invoking it from the shell. A list of options is shown in <a href="246#2.html">Table 18.1</a>.</p>
<pre>
jpython [options] [-jar jar | -c cmd | file | -] [args]
</pre>
<A naMe="2"></a><p><Table BordER="1" CEllspACINg="0" celLPADding="1" WIDTh="100%">
<caption><h5>Table
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -